Path Property
Applies To
AddIn object, Application object, Dictionary object, Document object, FileConverter object, RecentFile object, Subdocument object, Template object.
Description
Returns the path to the specified AddIn, Application, Dictionary, Document, FileConverter, RecentFile, Subdocument, or Template object. Read-only String.
Note The path doesn't include a trailing character — for example, C:\MSOffice). Use the PathSeparator property to add the character that separates folders and drive letters (in Windows, a backslash (\); on the Macintosh, a colon (:)). Use the Name property to return the file name without the path and use the FullName property to return the file name and the path together.
See Also
FullName property, Name property, PathSeparator property.
Example
This example displays the path and file name of the active document.
MsgBox ActiveDocument.Path & Application.PathSeparator & _
ActiveDocument.Name
This example changes the current folder to the path of the template attached to the active document.
ChDir ActiveDocument.AttachedTemplate.Path
This example displays the path of the first addin in the AddIns collection.
If AddIns.Count >= 1 Then MsgBox AddIns(1).Path