Thread: [Solved] Update TOC
View Single Post
 
Old 08-14-2012, 11:44 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,381
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I previously advised you that that code would throw an error if there was no TOC in the document - and I supplied code that wouldn't. In any event, it's pointless updating fields upon close, for two reasons at least:
1. It requires a re-save of the document after updating, even if it's already been saved; and
2. Doesn't guarantee that the updated fields will be correct if the document is opened on another PC or even on the same PC with a different active printer.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote