2017-01-21 20 views
-1

VBS文件下面是我有如何調用從Outlook

strPath = "C:\Scripts\vba\gggg.vbs" 
Set objShell = CreateObject("WScript.Shell") 
objShell.Run Chr(34) & strPath & Chr(34), 1, True 

我不斷收到關於strPath = "C:\Scripts\vba\gggg.vbs" enter image description here

+0

*沒有工作*是一個絕對無用的問題描述unle你解釋什麼*不起作用*的意思。您在發佈的代碼中遇到了哪些具體問題**? –

回答

-1

使用shell + explorer.exe出錯打開VBS文件...

例子

Option Explicit 
Public Sub Example() 
    Shell "Explorer.exe ""C:\Temp\FileName.vbs""", 1 
End Sub