(Visual Basic 6.0) Transition from Imap.FetchSequenceAsMime to Imap.FetchSingleBd
Provides instructions for replacing deprecated FetchSequenceAsMime method calls with FetchSingleBd. Note: This example requires Chilkat v11.0.0 or greater.
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
Dim success As Long
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
|