Sample code for 30+ languages & platforms
Visual FoxPro

Save Web Page as .mht Web Archive

See more MHT / HTML Email Examples

Downloads a web page into a .mht web archive.

Chilkat Visual FoxPro Downloads

Visual FoxPro
LOCAL lnSuccess
LOCAL loMht

lnSuccess = 0

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

loMht = CreateObject('Chilkat.Mht')

lnSuccess = loMht.GetAndSaveMHT("http://www.bonairefishing.com/","bonairefishing.mht")
IF (lnSuccess <> 1) THEN
    ? loMht.LastErrorText
    RELEASE loMht
    CANCEL
ELSE
    ? "MHT Created!"
ENDIF

RELEASE loMht