Messages Collection

Parent object: Folder object.

An object reference to a Messages collection is returned from the Messages property of a Folder object.

The Messages collection contains all the Message objects in the current Folder object. Through the Messages collection, you can add Message objects to the current folder (Inbox only). Table 15.13 and Table 15.14 list the properties and methods, respectively, of the Messages collection.

Table 15.13. Messages Collection Properties

Property

Description

Count

An integer value that represents the number of Message objects currently contained in the Messages collection

Item

An object pointer that allows you to retrieve a specific Message object from the Messages collection

Table 15.14. Messages Collection Methods

Method

Description

Add

Adds a Message object to the Messages collection

Delete

Removes all the Message objects currently in the Messages collection

GetFirst

Retrieves the first Message object in the Messages collection

GetLast

Retrieves the last Message object in the Messages collection

GetNext

Retrieves the next Message object in the Messages collection in relation to a specific Message object

GetPrevious

Retrieves the previous Message object in the Messages collection in relation to a specific Message object

Get ASP in a Nutshell, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.