Sample code for 30+ languages & platforms
VB.NET

Transition from MailMan.LoadXmlFile to EmailBundle.LoadXml

Provides instructions for replacing deprecated LoadXmlFile method calls with EmailBundle.LoadXml.

Chilkat VB.NET Downloads

VB.NET
Dim success As Boolean = False

Dim mailman As New Chilkat.MailMan

' ...
' ...

Dim filePath As String = "c:/example/emailBundle.xml"

' ------------------------------------------------------------------------
' The LoadXmlFile method is deprecated:

Dim bundleObj As Chilkat.EmailBundle = mailman.LoadXmlFile(filePath)
If (mailman.LastMethodSuccess = False) Then
    Debug.WriteLine(mailman.LastErrorText)
    Exit Sub
End If


' ...
' ...



' ------------------------------------------------------------------------
' Do the equivalent using EmailBundle.LoadXml.

Dim bundle As New Chilkat.EmailBundle
success = bundle.LoadXml(filePath)
If (success = False) Then
    Debug.WriteLine(bundle.LastErrorText)
    Exit Sub
End If