#1
|
|||
|
|||
ActiveDocument.TableOfContents(1).UpdatePageNumber s not working
I have a process that generates 100's of documents and creates table of contents in each one. At the end I call both .Update and .UpdatePageNumbers. I noticed that sometimes the page numbers are not correct. If I right-click and use "Update Table" and select "update page numbers only" on each document, the page number issue is corrected. However, if I try to fix by going to an Immediate Window and entering the command ActiveDocument.TablesOfContents(1).UpdatePageNumbe rs it fails to update the numbers appropriately. I am not sure why doing it through Word works, but the VBA script does not.
|
#2
|
||||
|
||||
Maybe the content needs to be paginated before the page numbers can be calculated. Are you forcing a pagination at any stage?
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Tags |
fails, table of contents, updatepagenumbers |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OrganizerCopy method for ActiveDocument | AnnaNmty | Word VBA | 4 | 07-25-2018 08:31 PM |
ActiveDocument.Words(i).Characters.Last.Text statment not working | nbecklin | Word VBA | 3 | 12-08-2015 02:56 PM |
ActiveDocument.ContentControls(ID) not working | Tejas.T | Word VBA | 3 | 03-09-2015 06:50 PM |
wordapp.ActiveDocument.SaveAs Not Working | KSReynolds | Mail Merge | 1 | 07-18-2014 04:03 PM |
Using With ActiveDocument.Tables() | SuzeG | Word VBA | 1 | 01-08-2014 02:00 PM |