#1   Report Post  
Posted to microsoft.public.word.docmanagement
Bryan Bryan is offline
external usenet poster
 
Posts: 61
Default getting file path

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

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
dpf dpf is offline
external usenet poster
 
Posts: 3
Default getting file path

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!
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Helmut Weber Helmut Weber is offline
external usenet poster
 
Posts: 139
Default getting file path

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"

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Bryan Bryan is offline
external usenet poster
 
Posts: 61
Default getting file path

much easier than thought.
In my macro I coded:
""""
Dim fFname As String
With ActiveDocument
fFname = .Path
End With
"""""

Thanks,
Bryan


"Helmut Weber" wrote:

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"


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete file path stored in open file? Colada Microsoft Word Help 5 June 8th 07 07:37 AM
cannot open a word file. file name or path is invalid reghu Microsoft Word Help 2 February 24th 06 05:55 AM
How to remove a path to load a file I've moved under the File menu Donaldo New Users 15 August 25th 05 10:14 AM
How to diaply file path at the end of file A. K. Murthy Microsoft Word Help 3 April 11th 05 04:46 PM
file path Mary Ann M. Microsoft Word Help 4 March 18th 05 05:48 PM


All times are GMT +1. The time now is 04:22 AM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"