Platform SDK: CDO 1.2.1 |
The GetPrevious method returns the previous Message object in the Messages collection. It returns Nothing if no previous object exists, for example if already positioned at the beginning of the collection.
Set objMessage = collMessages.GetPrevious( )
If the GetLast method has not been called since the Messages collection was initialized, the behavior of the GetPrevious method is not defined. This can produce unexpected results if the collection is reinitialized with a Set statement in every iteration of a loop. The recommended procedure is to Set an explicit variable for the collection before entering the loop.
If the collection is empty, calling GetPrevious can produce unexpected results even if GetLast has been called.