FixPath_Word

Fixes the path for a given folder, PC or Mac by adding separator only if needed
Also can gets the path for active document

CodeFunctionName
What is this?

Public

Tested

Original Work
Function FixPath_Word(Optional InPath = "This", Optional Seperater = "FolderAuto_PC_or_Mac")
' To Fix the path as needed, always put the '\' at end ...
' FixPath (add the '\' character (: for Mac) to the end of string or not)
If InPath = "This" Then InPath = ActiveDocument.Path
If Seperater = "FolderAuto_PC_or_Mac" Then
Seperater = "\"
If Application.OperatingSystem Like "*Mac*" Then Seperater = ":"
End If
If Right(InPath, 1) < > Seperater Then InPath = InPath & Seperater
FixPath_Word= InPath
End Function

Optional InPath, Optional Seperater

Views 3,292

Downloads 1,395

CodeID
DB ID