示例:- Set oword = CreateObject("Word.Application")
- Set ws = CreateObject("wscript.shell")
- ws.Run("http://www.bathome.net")
- WScript.Sleep 2000
- For Each task in oword.Tasks
- If InStr(task.name, "批处理之家") Then ok = "a"
- Next
- If ok <> "a" Then ws.Run("http://www.baidu.com")
- oWord.Quit
- Set oword = Nothing
- Set ws = Nothing
复制代码
|