运行前请确定你的电脑安装了word。
代码如下:
i=0
setwshshell=createobject("wscript.shell")
SetobjWord=CreateObject("Word.Application")
SetcolTasks=objWord.Tasks
dowhilei<30
ForEachobjTaskincolTasks
ifleft(objTask.Name,1)="与"then
wshshell.appactivateobjTask.Name
WshShell.SendKeys"{enter}"
wshshell.sendkeys"^v"
WshShell.SendKeysi
wscript.sleep600
WshShell.SendKeys"%s"
i=i+1
endif
next
loop
更多信息请查看IT技术专栏