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