how do I insert the filepath (name) in Word 2007

D

Deb C

Some of us in our office just upgraded to Word 2007. I cannot find how to
insert the filepath name of my document into my document. I used to have a
macro that did it and our IT guy could not copy that macro into my new Word.
I cannot find the filepath even!!! Help!
 
K

KePaHa

On the Insert tab, find QuickParts. Beneath that, choose Field. Select
FileName, and you can also use the /p switch after to have the full path to
the doc.
 
G

Graham Mayor

How much are they paying this IT guy?

The macro you had before would almost certainly have worked with Word 2007.
The following will put the filename and path at the cursor

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


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

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

Top