Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Word
application.errors
conversions
docmanagement
drawing.graphics
formatting.longdocs
international
internet.assistant
mail
mailmerge.fields
menustoolbars
newusers
numbering
oleinterop
pagelayout
printingfonts
setup.networking
spelling.grammar
tables
vba.addins
vba.beginners
vba.customization
vba.general
vba.userforms
web.authoring
word6-7macros
word97vba
  
 
date: Tue, 26 Aug 2008 07:25:01 -0700,    group: microsoft.public.word.newusers        back       


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?
date: Tue, 26 Aug 2008 07:25:01 -0700   author:   Ray W

Re: 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?
date: Tue, 26 Aug 2008 17:49:50 +0300   author:   Graham Mayor

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us