View Single Post
 
Old 10-03-2015, 03:17 PM
billy8b8 billy8b8 is offline Windows 7 64bit Office 2013
Novice
 
Join Date: Jul 2014
Posts: 20
billy8b8 is on a distinguished road
Default Open a document based on a template, the page numbers in the TOC won't update

I have created a template with boilerplate text and a TOC. In the template, the page numbers in the TOC are correct. When I open a new document based on the template, all of the page numbers are “3.” I can’t figure out why.

This is a template that will be used by many people in a company, and they can’t all be expected to update the TOC. Also, they may need to go to a specific page when they open the new document.

Because I can’t figure out why this happens, I want to write a macro that updates the TOC when they open a new document based on the template. I wrote this macro:

Private Sub Document_New()
ActiveDocument.TablesOfContents(1).Update
End Sub

But it doesn’t seem to work either. Can the problem be with “ActiveDocument.”?

Thanks.
Reply With Quote