
of IE needs to be converted to use Edge.
You simply can not.
Internet Explorer provides a ActiveX (COM) interface, which you use in VBS.
Edge don't provide such.,
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I use the following code to display output from running VBS scripts, currently it uses Internet Explorer but with the demise of IE needs to be converted to use Edge.
Function IEinit()
Set objExplorer = Wscript.createobject("InternetExplorer.Application")
objexplorer.navigate "about:blank"
objExplorer.ToolBar = 0
objExplorer.StatusBar = 0
objExplorer.Visible = 1
objExplorer.Document.Title = "Script Status"
End Function
Function DisplayMSG(Output)
If output="" then
Exit Function
Else
Displaydata=DisplayData & Output
do while objExplorer.busy = True
loop
objExplorer.Document.Body.InnerHTML = Displaydata
objExplorer.document.parentwindow.scrollto 0,(objExplorer.document.Body.scrollheight)
end If
End Function
This needs to use only native windows components that are installed with the OS.
The script calls IEinit once at the beginning and uses a call to DisplayMSG with the HTML to display when required.
Any assistance would be appreciated.
Robert
of IE needs to be converted to use Edge.
You simply can not.
Internet Explorer provides a ActiveX (COM) interface, which you use in VBS.
Edge don't provide such.,
Hi @Robert Bruce ,
As informed by the other community member, you will not be able to automate the Edge browser like you automate the IE browser using the VBScript.
You said, 'I use the following code to display output from running VBS scripts, currently it uses Internet Explorer but with the demise of IE needs to be converted to use Edge.'
I would like to inform you that your VBScript will continue to work even after the IE browser retirement. So you do not need to convert your code to make it work with the Edge browser.
As part of the IE 11 application retirement, certain COM automation scenarios were inadvertently broken. These IE COM objects have been restored to their original functionality as of the Windows 11 November 2021 “C” update and the Windows 10 February 2022 “B” update (for versions 1809 and later). The COM scenarios will also continue to work after the IE11 desktop application is disabled after June 15, 2022. If you continue to experience issues after taking the update, please contact App Assure for remediation assistance.
Reference: Internet Explorer 11 desktop app retirement FAQ
Best Regards,
Deepak
----------
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Deepak,
Will this also work again after the update?
Set ie = CreateObject("InternetExplorer.Application")
ie.navigate URLAll
While ie.ReadyState <> 4
DoEvents
Wend
Set ieDoc = ie.document
ReturnData = ieDoc.activeElement.innerText
iCnt = Len(ReturnData)
Interesting. I had a new copy of Microsoft Office installed on my new laptop I recently received. I have an add-in that I created that implements the above code. The add-in works on the older laptop, and not the new one. So, hopefully, as soon as Office updates on my laptop to the current version, I'll be able to run it without issue. If it doesn't work after the update, I'll post on a new thread.
Thank you.