getting file path

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

Guest

In a template macro that I have I would like to get the full path name of the
active document.
I can get the document name and the template.

Thanks,
Bryan
 
Here's what I got via a friend of mine who referred me to puzzlenyc.org for
the answer:
On the menu bar, select Insert > Field...
In the CATEGORIES list, select DOCUMENT INFORMATION
Then, in the FIELD CODES list, select FILENAME and click the box next to ADD
PATH TO FILENAME.
Click OK, and end the macro. Then save your template.

- Hope this works!
 
Hi Bryan,

MsgBox ActiveDocument.Path
MsgBox ActiveDocument.Name
MsgBox ActiveDocument.FullName

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
much easier than thought.
In my macro I coded:
""""
Dim fFname As String
With ActiveDocument
fFname = .Path
End With
"""""

Thanks,
Bryan
 

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