Page 1 of 1

Saving a WebPage as MHT File

PostPosted: Fri Jul 19, 2013 12:09 am
by David de Argentina
This Function is very usefull for me:

Save as Save_MHT @ your function Folder

Code: Select all
{NeoBook Function}
Version=5.80
Language=VBScript
Param=[%2]|Text|FileName
Param=[%1]|Text|URL
Param=[%4]|Text|UserName (optional)
Param=[%5]|Text|PassWord (optional)
Param=[%3]|Text|Resources: 0=All, 1=None
{End}
Set objMsg = CreateObject("CDO.Message")
Set objStream = CreateObject("ADODB.Stream")
if "[%3]" = "0" Then
  objMsg.CreateMHTMLBody "[%1]", 0, "[%4]", "[%5]"
Else
  objMsg.CreateMHTMLBody "[%1]", 31, "[%4]", "[%5]"
End if
Set objStream = objMsg.GetStream
objStream.SaveToFile "[%2]", 2
Set objMsg = Nothing
Set objStream = Nothing


Resources means if you want save images/Objects/Links/Frames/BGSounds or not

Usage:

Code: Select all
Call "VBScript Examples\Save_MHT" "c:\webpage.mht" "http://neobook.com.ar/" "" "" "0"


My 0.01
David de Argentina

Re: Saving a WebPage as MHT File

PostPosted: Fri Jul 19, 2013 9:33 am
by dpayer
Very nice!

Thanks for sharing.

David P.

Re: Saving a WebPage as MHT File

PostPosted: Fri Jul 19, 2013 11:14 am
by Luiz Alfredo
Very good. Thanks.

Re: Saving a WebPage as MHT File

PostPosted: Sat Jul 20, 2013 11:47 pm
by CN_Iceman
Thank's for sharing.

Re: Saving a WebPage as MHT File

PostPosted: Sun Jul 21, 2013 3:29 am
by chromebandit
Nice one thank you!