View Single Post
 
Old 02-04-2014, 07:41 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,366
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

Simpler and more comprehensive:
Code:
Sub AutoNew()
Dim TOC As TableOfContents
For Each TOC In ActiveDocument.TablesOfContents
  TOC.Update
Next
End Sub
Note that the above fully updates the TOC (e.g. for new/edited entries), whereas Charles' version only updates the page #s (though I don't know why anything about a TOC would need updating via an AutoNew macro - AutoOpen I could understand).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote