Update all TOC

L

lallous

Hello

I have created a main TOC, then many other sub-TOCs for each chapter in my
document.
How can I update entire TOCs (tables, figures, toc) of the whole document?

The CTRL+A then F9 doesn't seem to work (it is not showing the usual F9
dialog if you are inside one TOC).

Please advise.
 
S

Stefan Blom

Ctrl+A and F9 should work for any number of table of contents. Note
that you may not always see the dialog box.

If you are sure that it doesn't work correctly, you may want to verify
that a TOC hasn't been unlinked. Just press Alt+F9 to see if there are
still TOC fields displaying. Click Alt+F9 again to hide the field
codes.

--
Stefan Blom
Microsoft Word MVP


in messsage
news:[email protected]...
 
C

Charles Kenyon

Is your problem that your TOC fields are not updating or that you are not
getting the dialog box?

Version of Word?

The following updates TOC fields and TOA fields in the body of the document.
I don't know the field constant for a table of figures. Note, it will not
reach those in a header/footer nor in a text box. (This limitation also
applies to Ctrl-A, F9.) Macros do not give you the dialog box, I'm not sure
if Ctrl-A, F9 does or not.

Sub TOCFieldUpdate()
' Written by Charles Kyle Kenyon 27 January 2005
' Field Updater - TOC fields
Dim oField As Field
On Error Resume Next
For Each oField In ActiveDocument.Fields
If oField.Type = wdFieldTOC Then
oField.Update
End If
If oField.Type = wdFieldTOA Then
oField.Update
End If
Next oField
End Sub

The following should reach headers and footer or text boxes, haven't tested
with text boxes.

Sub TOCFieldUpdateAllStory()
' Written by Charles Kyle Kenyon 15 November 2001
' repaired by Jezebel
' All Story Field Updater - TOC fields
Dim oField As Field
Dim oStory As Range
' On Error Resume Next
For Each oStory In ActiveDocument.StoryRanges
' This goes into headers and footers as well as the regular document
Do
For Each oField In oStory.Fields
If oField.Type = wdFieldTOC Then
oField.Update
End If
If oField.Type = wdFieldTOA Then
oField.Update
End If
Next oField
Set oStory = oStory.NextStoryRange
Loop Until oStory Is Nothing
Next oStory
End Sub
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide




--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top