Application.PathSeparator property (Publisher)
Returns a String that represents the character used to separate folder names. Read-only.
Syntax
expression.PathSeparator
expression A variable that represents an Application object.
Return value
String
Remarks
Use PathSeparator to build web addresses even though they contain forward slashes (/).
The Document.FullName property returns the path and file name as a single string.
For worldwide compatibility, we recommend that you use this property when building paths, rather than referring explicitly to path separator characters in code (for example, "/").
Example
This example displays the path and file name of the active document.
Sub PathFileName()
With Application
MsgBox "The name of the active document: " & vbLf & _
.Path & .PathSeparator & ActiveDocument.Name
End With
End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.