how do you enter file path indicator at the foot of a page in XP

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to be able to simply insert a documents file path at the foot of the
document to simplify finding it in the future
 
Place the Cursor in the footer.
On the toolbar, select Insert/Field
Under field names, select Filename
In Field options check the Add path to filename check box
Click OK.

Hope this helps,
 
If you want just the path, you need a macro. The following will insert the
path at the cursor. As you don't get a path until the document has been
saved, the macro will force a save if required.

Sub InsertPath()
Dim pPathname As String
With ActiveDocument
If Len(.Path) = 0 Then
.Save
End If
pPathname = .Path
End With
Selection.TypeText pPathname
End Sub

The following inserts the path and the filename (though a {filename \p}
field will also do that if you prefer.

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

http://www.gmayor.com/installing_macro.htm


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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

Back
Top