View Single Post
  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default

On Sun, 27 Feb 2005 00:07:01 -0800, "Gadi"
wrote:

In Word 2000, there was an option to automatically update of fields (such as
cross-references) when opening a document.
It seems to me that this option has dissappeared. I know there is an option
to do it before printing, and to manually do it using F9, but it is not
enough.
I would like my cross-references to be correct all the time, especially when
someone opens the document.
Is there a solution?
Thanks,
Gadi


The behavior may be related to a security change in one of the Office
service packs, as described at
http://support.microsoft.com/?kbid=330079. That article explains how
to make a registry entry to allow updating. That won't have any effect
on other people's computers, though.

If that isn't it, I'm afraid the cure is worse than the ailment. You
would have to place an AutoOpen macro in the document that updates all
fields (since you wouldn't be sending the template to other people,
storing the macro there wouldn't do any good). But that macro would
trigger the virus warning box, and the user would have to click the
Enable button. If you think that's less of a problem than possibly
stale references, here's the macro:

Public Sub AutoOpen()
Dim myStoryRange As Range

For Each myStoryRange In ActiveDocument.StoryRanges
myStoryRange.Fields.Update
Do While Not (myStoryRange.NextStoryRange Is Nothing)
Set myStoryRange = myStoryRange.NextStoryRange
myStoryRange.Fields.Update
Loop
Next myStoryRange
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org