Skip to content

FindNext - cMapiHandler

Finds either the first or the next message in the queue

Type: Function
Return Data Type: String

Parameters

Parameter Type Description
sSeedMessageId String Previous message id to continue search on
iFlags Integer Flags can be iOr'edConstantMeaning

Syntax

Function FindNext String sSeedMessageId Integer iFlags Returns String

Call Example

Get FindNext sSeedMessageId iFlags to StringVariable

Description

The FindNext method will find either the first or the next message in the queue. When sSeedMessageId is empty it will find the first message else the next message to sSeedMessageId is found. The found sSeedMessageId is returned or empty when an error was found or the end of the queue is reached.

This function returns one of the following error codes if not successful:

Error code Meaning
2 The flFlags parameter is invalid or one or more unspecified errors occurred.
5 There was insufficient memory to proceed. The session was not terminated.
16 A matching message could not be found.
17 An invalid message identifier was passed in the lpszSeedMessageID parameter. No message was found.
19 An invalid session handle was used for the lhSession parameter. The session was not terminated.

Example

Get FindNext Of oMapiSession sMessageId iFindNextFlags To sMessageId

Return Value

Returns an error codes if not successful