I have a series of documents that are created with an attached template that includes an AutoOpen macro. Amongst other things the macro sets the chapter number or appendix letter of the chapter based on data that is passed into a document variable. That chapter number is used in the sections of the document that appear in the table of contents.
If that document is saved and then re-opened without the AutoOpen macro running (by holding down the Shift key), the document looks like it did when it was saved. The chapter number will be present in the title and TOC. However, if I open the document in code, even if I DisableAutoMacros(1), the chapter number is no longer present, reverting instead to template default in the TOC of 0.1, 0.2 etc.
Can anyone explain this? Is there a way to open the document without running the AutoOpen but still have the information present?
Office 2013
Windows 7