Opening webpage from vba without opening new IE window

L

Larry

I can open a webpage from vba a couple of different ways:

pAddress = "C:\Program Files\Internet Explorer\IEXPLORE.EXE " & sAddress
Shell pAddress, vbNormalFocus

Shell ("C:\Program Files\Internet Explorer\IEXPLORE.EXE _
www.washingtonpost.com"), vbNormalFocus

But these open a new IE window each time. Is it possible to load a
webpage into an existing IE window, without open a new IE window?

Thanks,
Larry
 
L

Larry

Another way of asking the same question is,

Is there a vba equivalent of running an address in the Run dialog box?
If I run an address, say www.webpage.com, in the Run dialog box, and if
an IE window is already open, the webpage will open in that window
instead of opening a new IE window.

Another question: is there a vba way of displaying the Run dialog box?
 
L

Larry

One more thing. There is this method:

ActiveDocument.FollowHyperlink Address:="http://www.Microsoft.com"

This is the equivalent of left clicking a hyperlink in Word 97, or
right-clicking a hyperlink and choosing Open. But I want to avoid this
because I don't like the way the IE window opens in the same window as
Word. Each time it's done that way, there's a message in the status
bar, "Word is preparing to load document," and the the webpage
eventually opens. But this definitely takes longer than clicking on a
hyperlink in an e-mail, or clicking on a hyperlink in a webpage.

In other words, if you click on a hyperlink in an e-mail or a webpage,
the web page opens, period. But the whole process is more complicated
when you do it from Word. This is strange, given the promotion of
Word's great interactivity with the Web.

Larry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top