Visual Basic 6.0
Visual Basic 6.0
Transition from Imap.FetchSequenceHeaders to Imap.FetchRange
Provides instructions for replacing deprecated FetchSequenceHeaders method calls with FetchRange.Chilkat Visual Basic 6.0 Downloads
Dim success As Long
success = 0
Dim imap As New ChilkatImap
' ...
' ...
Dim startSeqNum As Long
startSeqNum = 1
Dim count As Long
count = 5
' ------------------------------------------------------------------------
' The FetchSequenceHeaders method is deprecated:
Dim bundleObj As ChilkatEmailBundle
Set bundleObj = imap.FetchSequenceHeaders(startSeqNum,count)
If (imap.LastMethodSuccess = 0) Then
Debug.Print imap.LastErrorText
Exit Sub
End If
' ...
' ...
' ------------------------------------------------------------------------
' Do the equivalent using FetchRange.
' Your application creates a new, empty EmailBundle object which is passed
' in the last argument and filled upon success.
Dim headersOnly As Long
headersOnly = 1
Dim bundleOut As New ChilkatEmailBundle
success = imap.FetchRange(headersOnly,startSeqNum,count,bundleOut)
If (success = 0) Then
Debug.Print imap.LastErrorText
Exit Sub
End If