Item Property (Recipients Collection)
Item Property (Recipients Collection)
The Item property returns a single Recipient object from the Recipients collection. Read-only.
Syntax
objRecipColl.Item(index)
index
A long integer ranging from 1 to objRecipColl.Count, or a string that specifies the name of the object.
The Item property is the default property of a Recipients collection, meaning that objRecipColl**(index)** is syntactically equivalent to objRecipColl.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 objRecipsColl = objOriginalMsg.Recipients
Count = objRecipsColl.Count
For i = 1 To Count Step 1
Set objOneRecip = objRecipsColl.Item(i) ' or objRecipsColl(i)
strRecips = strRecips & objOneRecip.Name & "; "
Next i
MsgBox "Message recipients: " & strRecips