Share via

Redirection from Internet Explorer to Microsoft Edge for compatibility with modern web sites

Anonymous
2022-11-07T10:06:27+00:00

Hi Team,

Good Day!!

Our Macro Application project is using the SHDocVw DLL reference, to set some browser properties, after which a link is opened in the Internet Explorer application.

However, as the Internet Explorer application is retired, we are trying to migrate to Microsoft Edge. Since the SHDocVw reference is only applicable for the Internet Explorer browser, we're unable to find how the same can be replicated for the Microsoft Edge browser.

We tried the below code for opening links in the Microsoft Edge browser, but we're unable to set the browser properties, like we set using the SHDocVw reference:

SHDocVw.ShellWindows shellWindows = new SHDocVw.ShellWindows();

foreach (SHDocVw.InternetExplorer ie in shellWindows)

{ if (ie.FullName.Contains("IEXPLORE"))

{ try

{

doc = ie.Document; if (doc.url.Contains("https://www.google.com/"))

{

TempBrowser = ie; CurrentTitle = doc.title; break; } }

catch { }

} }

Application.DoEvents();

}

while (TempBrowser.Busy || TempBrowser.ReadyState != tagREADYSTATE.READYSTATE_COMPLETE)

{ Application.DoEvents();

Kindly check and let us know, How can we modify the SHDocVw.ShellWindows(), method and properties to Microsoft edge.

Thank you

Sanju

Microsoft Edge | Website issues | Windows 10

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. DaveM121 891.6K Reputation points Independent Advisor
    2022-11-07T10:40:06+00:00

    Hi Sanju_4c5,

    I am Dave, I will help you with this.

    I apologize, Community is just a consumer forum, due to the scope of your question can you please post this question to our sister forum on Microsoft Q&A (The System Admins and Developer Forum)

    Over there you will have access to a host of Developers and System Admin experts and will get a knowledgeable and quick answer to this question.

    https://docs.microsoft.com/en-us/answers/index....

    Was this answer helpful?

    0 comments No comments