Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve filename

Status
Not open for further replies.

webstony

Technical User
Jan 29, 2001
19
DE
Hello everybody,

may you can help me with this:

how can i retrieve the filename of the current opened word document with a vba command?
(it is a word document in which i use an AutoOpen macro. every time when it is opened i start the saveAs dialog, so it is not the same filename any more)

 
Use:

ActiveDocument.Name to get name.

and

ActiveDocument.Path to get path.
 
You can simply do:

ActiveDocument.FullName

And it will return a string with the full pathname of the active document.

Or

ActiveDocument.Name

To get only the filename without the path

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top