It depends on your definition of 'automatically'. You could put a { filename
\p } field in the footer, but the document will not have a name and path
until the document is saved, and when you save it the field will only update
if you force an update. You can use the macro at
http://www.gmayor.com/installing_macro.htm to update the field.
Or you can simply insert the filename and path into the document using a
macro e.g.
Sub InsertFileNameAndPath()
Dim fFname As String
With ActiveDocument
If Len(.Path) = 0 Then
.Save
End If
fFname = .FullName
End With
Selection.TypeText fFname
End Sub
or into the footer
Sub InsertFileNameAndPath()
Dim fFname As String
With ActiveDocument
If Len(.Path) = 0 Then
.Save
End If
fFname = .FullName
End With
Selection.EndKey Unit:=wdStory
ActiveWindow.ActivePane.View.SeekView = _
wdSeekCurrentPageFooter
Selection.TypeText fFname
ActiveWindow.ActivePane.View.SeekView = _
wdSeekMainDocument
End Sub
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>