How To Programmatically Wait For Shell Command To Finish Running?

前端 未结 1 612
甜味超标
甜味超标 2020-12-20 20:03

I am sending emails in a program like so:

Call Shell(smtpPath, emailInput...)

This works great, except if I call the function twice, the fu

相关标签:
1条回答
  • 2020-12-20 20:14

    You could use WScript.Shell, and it's run method:

    Set objShell = CreateObject("WScript.Shell")
    result = objShell.Run(smtpPath & " " & emailInput, 0, true)
    
    0 讨论(0)
提交回复
热议问题