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

Save as "MHT"

Status
Not open for further replies.

rssql

Programmer
Jul 22, 2002
87
US
Why am i unable to find any code for saving a web page as *.mht?
 
You can download the Office 2000 Web Archive add-in from:


Then your script can run webarch.exe {html file} as an external utility.

Seems to work fine on machines w/o Office 2000 installed.

I'm not aware of a free MHT-maker component, but a web search should reveal several $$ ones.
 
Oh, I should mention that webarch requires that Outlook Express be installed, and also that you can enter webarch /? for command details.
 
this code should do it

Code:
dim message, conf, stream
set message = CreateObject("CDO.Message")
set conf = CreateObject("CDO.Configuration")
set message.Configuration = conf
message.CreateMHTMLBody "[URL unfurl="true"]http://www.nu.nl"[/URL]
set stream = message.GetStream()
stream.SaveToFile "nu-nl.mht"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top