Save HTML as text

I want to open up a webpage in Internet Explorer and then save the displayed page as a text file.

Worst case scenario, I'm willing to open up the webpage in Internet Explorer and read out the HTML Source code line by line and create my own text box... but I can't figure out how to do that either.

Any ideas how to do this in VB6?
[359 byte] By [MeatLander] at [2007-11-20 11:55:22]
# 1 Re: Save HTML as text
Search for PARSE HTML. It's been discussed before. It's not hard to grab the html, and parse thru it.
dglienna at 2007-11-9 19:31:51 >
# 2 Re: Save HTML as text
I figured it had been done before but I didn't know what to search for. I tried "HTML SOURCE CODE" but that didn't turn up much. :b

The good news is that I did, just 10 seconds ago, figure out how to do it. Below is my code for anybody in the future that wants to do something similar and finds this thread.

Note: Refrence 'Microsoft HML Object Library'

Dim objMSHTML As New MSHTML.HTMLDocument
Dim objDocument As MSHTML.HTMLDocument
Dim strHTMLCode As String

' Open the page
Set objDocument = objMSHTML.createDocumentFromUrl(txtWebAddress, vbNullString)

' Wait fot the page to load
While objDocument.ReadyState <> "complete"
DoEvents
Wend

' Write it to a text file
strHTMLCode = objDocument.documentElement.outerHTML

Thanks for your help guys!
MeatLander at 2007-11-9 19:32:55 >