Sample code for 30+ languages & platforms
Tcl

Save Web Page to MHT String

See more MHT / HTML Email Examples

Downloads a web page into a string variable containing MHT. MHT is a web archive with all images and style sheets embedded. It's a MIME-formatted text document. When saved with the .mht extension, Internet Explorer can open and display the page.

Chilkat Tcl Downloads

Tcl

load ./chilkat.dll

# This example assumes the Chilkat API to have been previously unlocked.
# See Global Unlock Sample for sample code.

set mht [new_CkMht]

set mhtStr [CkMht_getMHT $mht "http://www.google.com/"]
if {[CkMht_get_LastMethodSuccess $mht] != 1} then {
    puts [CkMht_lastErrorText $mht]

} else {
    puts "$mhtStr"
}


delete_CkMht $mht