(Visual Basic 6.0) Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml
Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml. Note: This example requires Chilkat v11.0.0 or greater.
Dim mailman As New ChilkatMailMan
' ...
' ...
Dim filePath As String
filePath = "c:/example/emailBundle.xml"
' ------------------------------------------------------------------------
' The LoadXmlFile method is deprecated:
Dim bundleObj As ChilkatEmailBundle
Set bundleObj = mailman.LoadXmlFile(filePath)
If (mailman.LastMethodSuccess = 0) Then
Debug.Print mailman.LastErrorText
Exit Sub
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using EmailBundle.LoadXml.
Dim bundle As New ChilkatEmailBundle
Dim success As Long
success = bundle.LoadXml(filePath)
If (success = 0) Then
Debug.Print bundle.LastErrorText
Exit Sub
End If
|