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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Saving an htm file as text 2

Status
Not open for further replies.

lag1

Programmer
Oct 22, 2002
10
US
When looking at a webpage that contains tables of data, simply saving the webpage as a .txt file will save it pretty much as it appears on the web without all of that html code. That is what I would like to do using VB6.

I would like to accomplish this similar to the discussion on forum:

The goal in that forum was to SAVE a file without prompting. I would like to SAVEAS a file without prompting, to save the page displayed as text rather than the html code behind the page.

Thanks!
 
See the following code. This may give you an idea.
___
[tt]
Private Sub Form_Load()
Dim IE As Object
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "While IE.Busy
DoEvents
Wend
Open "C:\content.txt" For Binary As #1
Put #1, , CStr(IE.Document.body.innertext)
Close #1
End
End Sub[/tt]
 
More than an idea -- that did the trick! Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top