Visual Basic Examples

ChilkatHOMEAndroid™ASPVisual BasicVB.NETC#iOS (IPhone)Objective-CC++CMFCDelphiFoxProJavaPerl
PHP ExtensionPHP ActiveXPythonPowerShellRubySQL ServerVBScript

VB Examples

Bounced Mail
Bz2
Character Encoding
CSV
Digital Certificates
Digital Signatures
Email
FTP
HTML Conversion
HTTP
IMAP
Encryption
MHT / HTML Email
POP3
RSA
S/MIME
SFTP
SMTP
Socket
Spider
SSH
SSH Key
SSH Tunnel
String
Tar
Upload
XML
XMP
Zip Compression

More Examples...
Amazon S3
Email Object
DKIM / DomainKey
NTLM
DH Key Exchange
DSA
FileAccess
RSS
Atom
Self-Extractor
Service
Bzip2
PPMD
Deflate
LZW


VB Strings
VB Byte Array

 

 

 

 

 

 

 

Unpack HTML Email to Files

Unpacks an HTML email into an HTML file and related files (images and style sheets). The links within the HTML are updated to point to the files unpacked and saved to disk.

Download Chilkat Email ActiveX

Download 32-bit Chilkat IMAP ActiveX (.msi)

Download All 32-bit Chilkat ActiveX Components (.zip)

Download All 64-bit Chilkat ActiveX Components (.zip)

Dim email As New ChilkatEmail2

Dim success As Long
success = email.LoadEml("bonaire.eml")
If (success <> 1) Then
    MsgBox email.LastErrorText
    Exit Sub
End If

'  Is this an HTML email?
If (email.HasHtmlBody() = 1) Then

    '  Unpack the HTML to files.  The image and css URLs
    '  in the HTML are modified to point to the files extracted to disk.
    Dim unpackDir As String
    unpackDir = "c:/temp"
    Dim partsSubdir As String
    partsSubdir = "images"
    Dim htmlFilename As String
    htmlFilename = "thisEmail.html"
    success = email.UnpackHtml(unpackDir,htmlFilename,partsSubdir)
    If (success <> 1) Then
        MsgBox email.LastErrorText
    End If

    '  If the UnpackHtml method was successful, the
    '  HTML is written to c:/temp/thisEmail.html and
    '  the image files are located in c:/temp/images

End If


© 2000-2012 Chilkat Software, Inc. All Rights Reserved.