Selection.Item Method
Outlook Developer Reference |
Returns an Outlook item from a collection.
Syntax
expression.Item(Index)
expression A variable that represents a Selection object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
Index | Required | Variant | Either the index number of the object, or a value used to match the default property of an object in the collection. |
Return Value
An Object value that represents the specified object.
Example
The following Microsoft Visual Basic/Visual Basic for Applications (VBA) example uses the Count property and Item method of the Selection collection returned by the Selection property to display the senders of all messages selected in the active explorer window. To run this example without errors, select items of type MailItem only. Other types such as ReportItem do not have the SenderName property and will cause an error.
Visual Basic for Applications |
---|
|
See Also