在使用以下脚本保存附件后需要运行应用程序。
如何调用它后结束子?
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
saveFolder = "C:\New folder\tmp\"
For Each objAtt In itm.Attachments
objAtt.SaveAsFile saveFolder & "\" & objAtt.DisplayName
Set objAtt = Nothing
Next
End Sub
答案 0 :(得分:0)
在VBA中打开应用程序
Sub OpenApp()
Dim x As Variant
Dim Path As String
'// Application Path
Path = "C:\Program Files\blabla.exe"
x = Shell(Path, vbNormalFocus)
End Sub