Platform SDK: CDO 1.2.1

Item Property (CDONTS Recipients Collection)

The Item property returns a single Recipient object from the Recipients collection. Read-only.

Syntax

collRecips.Item(index) 
 
index
A long integer ranging from 1 to collRecips.Count, or a string that specifies the name of the object.

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

Data Type

Object (Recipient)

Remarks

The Item property works like an accessor property for small collections.

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

Example

This code fragment shows the Count and Item properties working together:

' list all recipient names in the collection 
strRecips = "" ' initialize string 
Set collRecips = objMessage.Recipients 
Count = collRecips.Count 
For i = 1 To Count Step 1 
    Set objRecip = collRecips.Item(i) ' or collRecips(i) 
    strRecips = strRecips & objRecip.Name & "; " 
Next i 
MsgBox "Message recipients: " & strRecips