Automatically updating page headers / footers

  • Thread starter Thread starter Xavier
  • Start date Start date
X

Xavier

Dear readers,

We would like to create some documents with a
header/footer that has to be variable dependent on the
client that will use it. So if we change it (the header /
footer) once, it will be changed in all the documents that
are linked with it. I found how to insert a link to
another Word document, but then you have to manually
update the document before it works. Is there another way
to do so ?

thanks in advance
Xavier, CPS
 
Xavier,

You might consider an AutoOpen macro that will update all
fields when the document is first opened. Something like:

Sub AutoOpen()CommandBars("Forms").Visible = False
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
End Sub
 
Greg,

Thank you very much for your advice. I tried it and it
does work. However, if there is another possibility, I
would like to avoid macro's for security reasons.
 
Xavier,

I don't have a file with the necessary links to test, but
another possibility is Tools>Options>General>Update
Automatic Links at Open.

Problem is you may not be able to control whether your
user's have this option checked.

I am out of ideas.
 
Greg,

This does seem like an option that would do the trick
(reading the Microsoft help) ... except ... it doesn't :)
But thanks for the help, I always have the marco function
in case I don't find anything else.
 
Back
Top