Hi Team,
I'm trying to launch an URL in Edge browser through VBScript without a taskbar and status bar. Please find the snippet below.
URL = "https://www.google.co.in/"
Appli = "msedge about:blank"
dim WshShell
set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run Appli, 3
dim objShell
dim objShellWindows
set objShell = CreateObject("Shell.Application")
set objShellWindows = objShell.Windows 'Here i can able to get IE browser instance when i using iexplore but not the Edge
dim objEdge
dim Edge
for each objEdge in objShellWindows
if (not objEdge is nothing) then
if isObject(objEdge.Document) then
set Edge = objEdge.Document
if VarType(Edge) = 8 then
objEdge.ToolBar = 0
objEdge.StatusBar = 0
objEdge.Navigate2 URL
end if
end if
end if
set Edge = nothing
set objEdge = nothing
Next
Could anyone please guide me to get the Ege browser's instance in VBScript?
Note: The same code working fine with IE, if I change msedge as iexplore in Appli variable.
Thanks in Advance,
Vivek Ramesh