Platform SDK: CDO 1.2.1

Item Property (CDONTS Messages Collection)

The Item property returns a single Message object from the Messages collection. Read-only.

Syntax

collMessages.Item(index) 
 
index
A long integer ranging from 1 to the size of the Messages collection.

The Item property is the default property of a Messages collection, meaning that collMessages(index) is syntactically equivalent to collMessages.Item(index) in Microsoft® Visual Basic® code.

Data Type

Object (Message)

Remarks

The Item(index) syntax returns the Message object at the indicated position in the collection. It can be used in an indexed loop, such as the For ... Next construction in Visual Basic. The first item in the collection has an index of 1.

Although the Item property itself is read-only, the Message object it returns can be accessed in the normal manner, and its properties retain their respective read/write or read-only accessibility.

For more information on using the Count and Item properties in a collection, see the example in the Count property.