ikathegreat
ikathegreat

Reputation: 2321

Get current Word document's save directory

I have a Word document that is already saved and I need to get its existing save directory and/or full file path (i.e. C:\Users\Public\Documents\testDoc.docx).

How can this be acquired from a macro/VBA?

Upvotes: 4

Views: 26789

Answers (1)

shahkalpesh
shahkalpesh

Reputation: 33476

ActiveDocument.FullName

The above gives the full path to the document, including the file name.

ActiveDocument.Path

The above gives the directory where your document is saved.

ActiveDocument.Name

The above gives the name of the document, without path information.

Upvotes: 18

Related Questions