Share via


Path Property [Publisher 2003 VBA Language Reference]

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

expression.Path

expression Required. An expression that returns one of the objects in the Applies To list.

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.

Sub PathNames()

    Dim strPath As String
    Dim strName As String
    Dim strFullName As String

    strPath = Application.ActiveDocument.Path
    strName = Application.ActiveDocument.Name
    strFullName = Application.ActiveDocument.FullName

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

End Sub

Applies to | Application Object | Document Object