Sample code for 30+ languages & platforms
Visual Basic 6.0

Transition from Imap.FetchBundle to Imap.FetchMsgSet

Provides instructions for replacing deprecated FetchBundle method calls with FetchMsgSet.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

Dim imap As New ChilkatImap

' ...
' ...

Dim mset As New MessageSet
success = imap.QueryMbx("FROM joe@example.com",1,mset)
' ...
' ...

' ------------------------------------------------------------------------
' The FetchBundle method is deprecated:

Dim bundleObj As ChilkatEmailBundle
Set bundleObj = imap.FetchBundle(mset)
If (imap.LastMethodSuccess = 0) Then
    Debug.Print imap.LastErrorText
    Exit Sub
End If

' ...
' ...

' ------------------------------------------------------------------------
' Do the equivalent using FetchMsgSet.
' Your application creates a new, empty EmailBundle object which is passed 
' in the last argument and filled upon success.

Dim headersOnly As Long
headersOnly = 0

Dim bundleOut As New ChilkatEmailBundle
success = imap.FetchMsgSet(headersOnly,mset,bundleOut)
If (success = 0) Then
    Debug.Print imap.LastErrorText
    Exit Sub
End If