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

How to save a web page in mhtml (web archive) format, version 2

Automation

How to save a web page in mhtml (web archive) format, version 2

by  Olaf Doschke  Posted    (Edited  )
Code:
loMsg = CreateObject("CDO.Message")
loMsg.CreateMHTMLBody('http://www.atoutfox.com',0,'','')
loStream = loMsg.GetStream()
loStream.SaveToFile("d:\test3.mhtml")

And if you want to save the active webpage of an internetexplorere.application object (ie loIE), simply use loIE.LocationURL as the URL for the CreateMHTMLBody() method.

Bye, Olaf.
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top