Application.Path Property

Publisher Developer Reference

Returns a String indicating the full path to the file of the saved active publication, not including the last separator or file name.

Syntax

expression.Path

expression   A variable that represents an Application object.

Remarks

The FullName property can be used to return both the path and file name.

Example

The following example demonstrates the differences between the Path, Name, and FullName properties. This example is best illustrated if the publication is saved in a folder other than the default.

Visual Basic for Applications
  Sub PathNames()
Dim strPath As String
Dim strName As String
Dim strFullName As String

strPath = Application.ActiveDocument.<strong class="bterm">Path</strong>
strName = Application.ActiveDocument.Name
strFullName = Application.ActiveDocument.FullName

' Note the file name &amp; path differences
' while executing.
MsgBox "The path is: " &amp; strPath
MsgBox "The file name is: " &amp; strName
MsgBox "The path &amp; file name are: " &amp; strFullName

End Sub

See Also