Sample code for 30+ languages & platforms
DataFlex

Save Web Page as .mht Web Archive

See more MHT / HTML Email Examples

Downloads a web page into a .mht web archive.

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Boolean iSuccess
    Handle hoMht
    String sTemp1

    Move False To iSuccess

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

    Get Create (RefClass(cComChilkatMht)) To hoMht
    If (Not(IsComObjectCreated(hoMht))) Begin
        Send CreateComObject of hoMht
    End

    Get ComGetAndSaveMHT Of hoMht "http://www.bonairefishing.com/" "bonairefishing.mht" To iSuccess
    If (iSuccess <> True) Begin
        Get ComLastErrorText Of hoMht To sTemp1
        Showln sTemp1
        Procedure_Return
    End
    Else Begin
        Showln "MHT Created!"
    End



End_Procedure