Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Long Documents / October 2006

Tip: Looking for answers? Try searching our database.

Broken TOC updating

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
lykoszine@gmail.com - 10 Oct 2006 13:13 GMT
Hi Guys,

I've been looking at some macros to automatically change a toc in word
2000 to enable clickable entries (the \h in the toc field), then update
the toc.

Now whenever I try to update the toc, I no longer get the option of
updating line numbers or the whole table. This happens whether I run
the macro or not.

As far as I know I should be able to update the toc with

ActiveDocument.TablesOfContents(1).Update

or all fields with

Sub UpdateFields()
   Dim pRange As Word.Range
   For Each pRange In ActiveDocument.StoryRanges
       Do
           pRange.Fields.Update
           Set pRange = pRange.NextStoryRange
       Loop Until pRange Is Nothing
   Next
End Sub

But like I say, one of these has broken my toc updating. Even deleting
the toc and adding another does not affect this behaviour.

Help appreciated.
S
Cindy M. - 13 Oct 2006 14:31 GMT
Hi Lykoszine@gmail.com,

> I've been looking at some macros to automatically change a toc in word
> 2000 to enable clickable entries (the \h in the toc field), then update
[quoted text clipped - 22 lines]
> But like I say, one of these has broken my toc updating. Even deleting
> the toc and adding another does not affect this behaviour.

Updating all fields using VBA never sends an update to a TOC field. Those
have to be updated explicitly.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.