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

How to open a view source and save it as a .txt?

Status
Not open for further replies.

AFI247365

Programmer
Jul 12, 2001
13
US
I've been working on this one for some time now and have run ito a brick wall.
This is my code so far:

Dim WebBrowser As New InternetExplorer

Private Sub Command1_Click()

Dim n, pathname

n = 1

Const navOpenInNewWindow = 1

WebBrowser.Visible = False

WebBrowser.Navigate ("view-source: navOpenInNewWindow

Loop

End Sub

So i can open a browse and open the source code but i cant seem to find a way to save the file.
I have tried to look for the temp file that is made but it saved in different directoried under
C:\Windows\temopreryinternetfiles\content.ie5 and then in one of 12 different sub directories and they never apperar in just one of these directories.

i really need some help!

thanx
 
Webbrowser1.Document.FirstChild.OuterHTML or Webbrowser1.Document.all(0).OuterHTML are strings that contains the source. You can save these as you might any other string.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top