Sample code for 30+ languages & platforms
Visual Basic 6.0 Requires Chilkat v11.0.0+

Transition from Imap.FetchSequenceAsMime to Imap.FetchSingleBd

Provides instructions for replacing deprecated FetchSequenceAsMime method calls with FetchSingleBd.

Chilkat Visual Basic 6.0 Downloads

Visual Basic 6.0
Dim success As Long
success = 0

Dim imap As New ChilkatImap

'  ...
'  ...

Dim startSeqNum As Long
startSeqNum = 1
Dim count As Long
count = 5

'  ------------------------------------------------------------------------
'  The FetchSequenceAsMime method is deprecated:

Dim sa As CkStringArray
Set sa = imap.FetchSequenceAsMime(startSeqNum,count)
If (imap.LastMethodSuccess = 0) Then
    Debug.Print imap.LastErrorText
    Exit Sub
End If

'  ...
'  ...

'  ------------------------------------------------------------------------
'  Do the equivalent using FetchSingleBd.

imap.AutoDownloadAttachments = 1

success = 0
Dim bdMime As New ChilkatBinData
Dim bUid As Long
bUid = 0
Dim i As Long
i = 0
Do While i < count
    success = imap.FetchSingleBd(startSeqNum + i,bUid,bdMime)
    '  ...
    '  ...

    i = i + 1
Loop