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
Usage:
Code: Select all
Call "VBScript Examples\Save_MHT" "c:\webpage.mht" "http://neobook.com.ar/" "" "" "0"
David de Argentina