There are couple of ways to invoke Internet Explorer and navigating through an URL.
Method 1:
Function Invoke_Browser(str_url)
On Error resume next
'Create an IE browser object and invoke the URL
Set obj_Brow_invok = createobject("InternetExplorer.Application")
obj_Brow_invok .Visible = True
obj_Brow_invok .Navigate str_url
Do While obj_Brow_invok .Busy Or obj_Brow_invok .readyState <> 4
WScript.Sleep 50
Loop
Set obj_Brow_invok = Nothing
End Function
Method 2:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run"iexplore.exe www.yahoo.com", 1
WScript.Sleep 50
Set WshShell = Nothing
Method 1:
Function Invoke_Browser(str_url)
On Error resume next
'Create an IE browser object and invoke the URL
Set obj_Brow_invok = createobject("InternetExplorer.Application")
obj_Brow_invok .Visible = True
obj_Brow_invok .Navigate str_url
Do While obj_Brow_invok .Busy Or obj_Brow_invok .readyState <> 4
WScript.Sleep 50
Loop
Set obj_Brow_invok = Nothing
End Function
Method 2:
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run"iexplore.exe www.yahoo.com", 1
WScript.Sleep 50
Set WshShell = Nothing
No comments:
Post a Comment