Source language: Translate to:

Saving a WebPage as MHT File

Questions and information about using VBScript and JavaScript in NeoBook functions

Moderator: Neosoft Support

Saving a WebPage as MHT File

Postby David de Argentina » Fri Jul 19, 2013 12:09 am

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
User avatar
David de Argentina
 
Posts: 1559
Joined: Mon Apr 04, 2005 4:13 pm
Location: Buenos Aires, Argentina

Re: Saving a WebPage as MHT File

Postby dpayer » Fri Jul 19, 2013 9:33 am

Very nice!

Thanks for sharing.

David P.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1382
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Saving a WebPage as MHT File

Postby Luiz Alfredo » Fri Jul 19, 2013 11:14 am

Very good. Thanks.
L.A.G.M.
Luiz Alfredo
 
Posts: 195
Joined: Thu Apr 19, 2007 6:58 am
Location: Brazil

Re: Saving a WebPage as MHT File

Postby CN_Iceman » Sat Jul 20, 2013 11:47 pm

Thank's for sharing.
Greetings/Saludos, Jose.
www.icemansoft.es
User avatar
CN_Iceman
 
Posts: 297
Joined: Tue Mar 01, 2011 11:04 am
Location: España

Re: Saving a WebPage as MHT File

Postby chromebandit » Sun Jul 21, 2013 3:29 am

Nice one thank you!
User avatar
chromebandit
 
Posts: 283
Joined: Wed Nov 24, 2010 5:00 pm


Return to NeoBook Functions - VBScript & JavaScript

Who is online

Users browsing this forum: No registered users and 0 guests

cron