ItemProperties.Item Method (Outlook)
Returns an ItemProperty object from the collection.
Syntax
expression .Item(Index)
expression A variable that represents an ItemProperties object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Index |
Required |
Variant |
Either the zero-based index number of the object, or a value used to match the default property of an object in the collection. |
Return Value
An ItemProperty object that represents the specified object.
Example
The following code sample in Microsoft Visual Basic for Applications (VBA) assumes that you have opened a mail item in an Inspector. It shows how to loop from zero (0) to the total number of properties associated with the item minus one to display the name of each property.
Sub EnumerateItemProperties()
Dim oM As Outlook.MailItem
Dim i As Integer
Set oM = Application.ActiveInspector.CurrentItem
If Not (oM Is Nothing) Then
For i = 0 To oM.ItemProperties.count - 1
Debug.Print oM.ItemProperties(i).name
Next
End If
End Sub