【发布时间】:2016-12-13 13:46:33
【问题描述】:
我正在制作一个用于在我们的共享点上生成新项目项的工作工具。
在共享点上,我们有一个需要填写的表格,并确定我使用 IE.Document.All.Item("id").value=value 命令的表格的文本字段。
它在单独的 vbs 文件中工作,但是当我尝试从 hta 启动它时,它会在 IE.Documents.All.item 命令处阻塞。有人知道怎么解决吗?
代码如下(语言:vbscript):
Sub SendProjectData
Set IE = CreateObject("InternetExplorer.Application")
set WshShell = CreateObject("WScript.Shell")
IE.Navigate "https://sharepointpage"
IE.Visible = true
sleep1 6000 'external defined sleep command'
IE.Document.All.Item("projectid").Value = "projectname"
WshShell.AppActivate "IE"
WshShell.SendKeys "{ENTER}"
End Sub
【问题讨论】:
标签: forms vbscript hta autofill