Platform SDK: CDO 1.2.1 |
The Item property returns a single Recipient object from the Recipients collection. Read-only.
objRecipColl.Item(index)
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.
Object (Recipient)
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.
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