This is what we use:
Dim wsh
set wsh = CreateObject(""WScript.Shell"")
Set filesys = CreateObject(""Scripting.FileSystemObject"")
PDFPath = ""L:\Products\DrawingsPDF\""
PDFFile = ML_UDF_IMH_DRAWING_LOCATION
docPath = ""L:\DrawingsPDF\""
if filesys.FileExists(PDFPath & PDFFile) then
Return = wsh.Run(chr( 34) & PDFPath&PDFFile & chr(34),1,False)
else
Return = wsh.Run(chr( 34) & docPath&PDFFile & chr(34),1,False)
end if
Set wsh = Nothing