VBScript Examples

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

VBScript Examples

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

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

 

 

 

 

 

 

 

Load file into XML as Base64 Encoded Content

Loads any type file into an XML document. The file content is encoded as base64.

Download Chilkat XML ActiveX

Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set outFile = fso.CreateTextFile("output.txt", True)

set docRoot = CreateObject("Chilkat.Xml")

docRoot.Tag = "myDoc"

'  To zip compress the content, set this flag to 1
zipContent = 0
'  To 128-bit AES encrypt the content, set this flag to 1
encryptContent = 0
encryptPassword = ""

' pdfNode is a Chilkat.Xml
Set pdfNode = docRoot.NewChild("pdf","")

'  Embed a PDF into XML
success = pdfNode.SetBinaryContentFromFile("sample.pdf",zipContent,encryptContent,encryptPassword)
If (success <> 1) Then
    MsgBox pdfNode.LastErrorText

    WScript.Quit
End If

MsgBox pdfNode.LastErrorText

'  Display the entire XML document:
outFile.WriteLine(docRoot.GetXml())

'  Get the Base64-encoded content and display it:
outFile.WriteLine(pdfNode.Content)

'  Extract the binary content from XML:
unzipContent = 0
decryptContent = 0
decryptPassword = ""
success = pdfNode.SaveBinaryContent("out.pdf",unzipContent,decryptContent,decryptPassword)
If (success <> 1) Then
    MsgBox pdfNode.LastErrorText

    WScript.Quit
End If

MsgBox "Success!"
outFile.Close

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

Mail Component · XML Parser