VBScript
VBScript
Transition from MailMan.LoadXmlString to EmailBundle.LoadXmlString
Provides instructions for replacing deprecated LoadXmlString method calls with EmailBundle.LoadXmlString.Chilkat VBScript Downloads
Dim fso, outFile
Set fso = CreateObject("Scripting.FileSystemObject")
'Create a Unicode (utf-16) output text file.
Set outFile = fso.CreateTextFile("output.txt", True, True)
success = 0
set mailman = CreateObject("Chilkat.MailMan")
' ...
' ...
xmlBundleStr = "..."
' ------------------------------------------------------------------------
' The LoadXmlString method is deprecated:
' bundleObj is a Chilkat.EmailBundle
Set bundleObj = mailman.LoadXmlString(xmlBundleStr)
If (mailman.LastMethodSuccess = 0) Then
outFile.WriteLine(mailman.LastErrorText)
WScript.Quit
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using EmailBundle.LoadXmlString.
set bundle = CreateObject("Chilkat.EmailBundle")
success = bundle.LoadXmlString(xmlBundleStr)
If (success = 0) Then
outFile.WriteLine(bundle.LastErrorText)
WScript.Quit
End If
outFile.Close