I suppose you could always intercept the Save and SaveAs commands *in the
particular document template* to add the code to update the field. I have
used the simple switch to print preview and back method here which works for
this particular task and I have added a line to put the filename in the
document window caption.
You need to add a conditional field in the header/footer to put the filename
on the last page only. No section breaks needed.
i.e. {IF {Page} = {Numpages} "{FILENAME \p }"}
Sub FileSaveAs()
Dialogs(wdDialogFileSaveAs).Show
Options.UpdateFieldsAtPrint = True
Application.ScreenUpdating = False
PrintPreview = True
PrintPreview = False
ActiveDocument.ActiveWindow.View.Type = wdPrintView
Application.ScreenUpdating = True
ActiveWindow.Caption = ActiveDocument.FullName
End Sub
Sub FileSave()
Options.UpdateFieldsAtPrint = True
Application.ScreenUpdating = False
PrintPreview = True
PrintPreview = False
ActiveDocument.ActiveWindow.View.Type = wdPrintView
Application.ScreenUpdating = True
ActiveDocument.Save
ActiveWindow.Caption = ActiveDocument.FullName
End Sub
Should do the trick
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>