If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Adding file path and name to footer
I am building a template that I would like that file path and name to appear
automatically in the footer (like Excel). Is this possible in Word 2003? |
#2
|
|||
|
|||
Adding file path and name to footer
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 Word MVP web site http://word.mvps.org Ray W wrote: I am building a template that I would like that file path and name to appear automatically in the footer (like Excel). Is this possible in Word 2003? |
Thread Tools | |
Display Modes | |
|
|