PowerBuilder
PowerBuilder
Save Web Page as .mht Web Archive
See more MHT / HTML Email Examples
Downloads a web page into a .mht web archive.Chilkat PowerBuilder Downloads
integer li_rc
integer li_Success
oleobject loo_Mht
li_Success = 0
// This example assumes the Chilkat API to have been previously unlocked.
// See Global Unlock Sample for sample code.
loo_Mht = create oleobject
li_rc = loo_Mht.ConnectToNewObject("Chilkat.Mht")
if li_rc < 0 then
destroy loo_Mht
MessageBox("Error","Connecting to COM object failed")
return
end if
li_Success = loo_Mht.GetAndSaveMHT("http://www.bonairefishing.com/","bonairefishing.mht")
if li_Success <> 1 then
Write-Debug loo_Mht.LastErrorText
destroy loo_Mht
return
else
Write-Debug "MHT Created!"
end if
destroy loo_Mht