Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieve HTML source from IE 1

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
How would I go about retrieving the source HTML code from an IE object? For example, take the following code:
Code:
oIE=CreateObject("InternetExplorer.Application")
oIE.Navigate("[URL unfurl="true"]http://www.google.com")[/URL]
cSourceHTML=oIE.?????
What property of the IE object do I need to access to read the source HTML? (Ignore the fact that the code would execute far too fast...pretend I'm typing this in at the command line.)
 
if you want read it line by line at the command prompt try

? oIE.Document.Body.All(n).InnerHTML

n being the line you would like to see.
the text would be

? oIE.Document.Body.All(n).InnerText

 
Cool...thanks, alank01..that's what I wanted!

Now for the question of the day: how the heck did you figure that out? Is there some kind of list of objects/properties/methods for IE COM objects somewhere? I've never been able to find one, so have been hunting blindly for what does what.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top