Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-22-2019, 02:02 PM
bedwar2 bedwar2 is offline ActiveDocument.TableOfContents(1).UpdatePageNumber s not working Windows 10 ActiveDocument.TableOfContents(1).UpdatePageNumber s not working Office 2016
Novice
ActiveDocument.TableOfContents(1).UpdatePageNumber s not working
 
Join Date: Aug 2019
Posts: 1
bedwar2 is on a distinguished road
Default 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.
Reply With Quote
 

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.TableOfContents(1).UpdatePageNumber s not working 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
ActiveDocument.TableOfContents(1).UpdatePageNumber s not working Using With ActiveDocument.Tables() SuzeG Word VBA 1 01-08-2014 02:00 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft