View Single Post
  #7   Report Post  
Charles Kenyon
 
Posts: n/a
Default

The following is probably overkill, but if named AutoOpen, it will update
only Table of Contents and REF fields.
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 = wdFieldREF Then
oField.Update
End If
Next oField
Set oStory = oStory.Next
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

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
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.

"Suzanne S. Barnhill" wrote in message
...
Write an AutoOpen macro (saved in Normal.dot) to Ctrl+A, F9.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup
so
all may benefit.

"Faith" wrote in message
...
But there should be a way for Word to AUTOMATICALLY update

cross-references
and TOC fields (page numbers, in both cases) with the document is opened.

Do
you know of a way to configure this? I don't want my doc users to have
to
manually update all the cross-references and TOCs by pressing F9.

"Doug Robbins" wrote:

Have you tried Ctrl+A then F9? If the referred item still exists in
the
document, the cross reference to it should then be updated.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a

paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Seb" wrote in message
...
I write large reports and I use the cross referecne feature for tables

and
figures in Word XP extensively in my texts. Unfortunately now and

then I
have to rearrange or add/remove some of these tables and figures via

the
caption feature. The table/figure numbers are updated automatically

and
correctly, I apprecieate that

However, the cross-references in the texts themselves are not updated


In fact, the hyperlinks also point in the wrong places. That means I

have
to scan through every cross references and manually make alterations

to
these
references. I think that defeats the supposedly intended purpose of
having
the cross-reference feature in the first place. Perhaps this is a

bug?