Instantiate Internet Explorer in Outlook VBA

P

Pierre Scerri

The following code works well with Outlook 2003 in Windows XP and Vista:

Set Iexplr = New InternetExplorer
With Iexplr
.Visible = False ' Hide the browser
.Navigate URL:="http://anywebsite.com/" ' go to the website

Do While .Busy: DoEvents: Loop ' Wait for the page to load
etc...

With Outlook 2007 and Vista, the .Visible command has no effect. The
..Navigate command opens a visible Internet Explorer, goes to the appropriate
website and makes the 'Iexplr' variable null. The .Busy command then fails
with Runtime error 462 and execution stops.

Any suggestions would be most helpful. Thank you.
 

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