Home > Net >  Hosting Microsoft Edge via WebView2Loader.dll with Excel VBA
Hosting Microsoft Edge via WebView2Loader.dll with Excel VBA

Time:03-23

The company I work for has developed some Excel workbooks with quite comprehensive VBA applications that uses WebBrowser (IE) embedded into a UserForm. Now when IE is end of it's life cycle there's a need to think about different approach. Edge would be the way to go but because these workbooks are also distributed to external parties Selenium driver is out of scope.

I saw that they have managed to utilize WebView2Loader.dll in AutoHotkey scripts here https://www.autohotkey.com/boards/viewtopic.php?t=81354 and here https://www.autohotkey.com/boards/viewtopic.php?f=83&t=79868

Would there be a way to do something similar with VBA? Basically it's COM wrapper around that WebView2 DLL.

Any help would be appreciated - thanks!

CodePudding user response:

Here's API to communicate with Chromium / EDGE from VBA without need to install any external libraries. https://www.codeproject.com/Tips/5307593/Automate-Chrome-Edge-using-VBA

It utilizes CDP (Chrome DevTools Protocol): https://chromedevtools.github.io/devtools-protocol/

  • Related