troubleshooting Question

MS Word macro for opening URL in an open browser

Avatar of docsimple
docsimple asked on
VB ScriptMicrosoft Word
5 Comments1 Solution4833 ViewsLast Modified:
I desperately want a MS Word macro that will look up a highlighted phrase in Google.

I'm currently using the following VBA code:

 Set oIE = CreateObject("InternetExplorer.Application")
 oIE.Visible = True
 oIE.Navigate (myURL)

Open in new window

However, this macro opens Internet Explorer in a new window each time I run it. This takes a few seconds and leaves lots of IE windows open after a few searches.

Is there any way of modifying it so that it doesn't open IE in a new window when IE is already open? Also, how would I change the code to use Chrome rather than IE?

Any suggestions would be greatly appreciated.

Francisco Igor
Software Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros