How do I automatically update the filename field in a footer with.

G

Guest

I know it is possible to put the filename and path in the footer of a
template but how do I get it to update automatically without printing the
document? I don't want my users to have to remember to press F9.
 
H

Helmut Weber

Hi Moira,
if you got some knowledge of programming,
intercepting the FileSaveAs-command might help.
But this example does not cover all kinds of headers and footers, etc.
For a full explanation see:
http://word.mvps.org/FAQs/MacrosVBA/FindReplaceAllWithVBA.htm
Sub FileSaveAs()
Dim oStr As Object
Dialogs(wdDialogFileSaveAs).Show
For Each oStr In ActiveDocument.StoryRanges
oStr.Fields.Update
Next
End Sub
 

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