View Single Post
  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Why don't cross-references update automatically?

Most fields don't update automatically. You need to force an update. The
example macro code at http://www.gmayor.com/installing_macro.htm will do so
for all but the most difficult circumstances (and they can be addressed when
identified) including text boxes and header/footers. Add the macro to a
toolbar button.

For a specific document you could modify the FileSave and FileSaveAs
functions, using the macro to incorporate the update in the saving process,
by saving the following in the document's template

Sub FileSave()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
On Error Resume Next
ActiveDocument.Save
ActiveWindow.Caption = ActiveDocument.FullName
End Sub

Sub FileSaveAs()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
On Error Resume Next
Dialogs(wdDialogFileSaveAs).Show
ActiveWindow.Caption = ActiveDocument.FullName
End Sub

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



"Daniel Pflughoeft" Daniel wrote in
message ...
Is there a reason cross-references aren't updated automatically?
Currently,
a user has to hit ctrl+a, f9 to update all cross-references (and do it
again
for the header/footer, since ctrl+a does not highlight them) in the
document.
This makes cross-references unusable for large documents edited by many
people, some of whom don't know that the cross-references need to be
manually
updated (or don't know how).

I can't imagine why this wouldn't be done automatically on save - perhaps
that can be added as a feature to Office 2010 SP1?

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow
this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...ocmanagemen t