Dim WSH As Object Set WSH = CreateObject("WScript.Shell") WSH.Run Chr(34) & FilePath & Chr(34) 'Set WSH = Nothing
※Chr(34)でFilePathを囲む必要がある。Chr34はダブルクォーテーション。
囲まないとファイルパスに空白が含まれていた場合に失敗する。
以上。
Dim WSH As Object Set WSH = CreateObject("WScript.Shell") WSH.Run Chr(34) & FilePath & Chr(34) 'Set WSH = Nothing
※Chr(34)でFilePathを囲む必要がある。Chr34はダブルクォーテーション。
囲まないとファイルパスに空白が含まれていた場合に失敗する。
以上。