
Saving a web page to file
On Fri, 17 Nov 2000 13:55:33 -0800, "Michael Harris"
Quote:
> Deja.com: Power Search
> http://www.deja.com/home_ps.shtml
> keywords: xmlhttp
> forum: microsoft.public.scripting.*
Thanks again Michael.
For the lurkers who are too lazy to search, here is how to save a web
page to a file:
With CreateObject("microsoft.xmlHTTP")
.open "GET", "http://www.altavista.com", False
.send
WriteToFile .responseText, "page.htm"
End With
Sub WriteToFile(text, file)
With CreateObject("Scripting.FileSystemObject")
With .CreateTextFile(file, True)
.Write text
.Close
End With
End With
End Sub