views:

136

answers:

1

So basically I have the following code:

Dim myIE As InternetExplorer: Set myIE = New InternetExplorer
myIE.Visible = True
myIE.Navigate URL:="http://www.google.com"
While myIE.Busy
    DoEvents  'wait until IE is done loading page.
Wend

How would I be able to get the source code of the page? And it'll be nice if someone can link me to the appropriate documentation. I'm absolutely hopeless looking through MS's website.

Cheers.

+2  A: 

You can retrieve the source HTML using:

strHTML = myIE.Document.body.innerHTML
Mitch Wheat
May not be exactly the same as what was in the .html file IE downloaded. But usually close enough.
jeffamaphone