-1
以下は、新しいウィンドウを開くために使用したコードブロックです。私はGetObjectの代わりにの代わりにオブジェクトを使ってみました。しかし、動作しませんでした。VB Scriptですでに開いているIEを使用するにはどうすればよいですか? GetObjectが機能しない
Set IE = GetObject("","InternetExplorer.Application")
「
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = True
IE.navigate "https://msn.com"
Do While IE.ReadyState <> 4
WScript.Sleep 1000
Loop
Set ElementCol = IE.Document.getElementsByTagName("a")
For Each Link In ElementCol
If Link.innerHTML = "News" Then
Link.Click
WScript.Sleep(6000)
Exit For
End If
Next
IE.navigate "https://msn.com"