ItemProperties Property

Microsoft Outlook Visual Basic

ItemProperties Property

       

Returns an ItemProperties collection that represents all properties associated with an item.

expression.ItemProperties

expression   Required. An expression that returns one of the objects in the Applies To list.

Remarks

The ItemProperties collection is a zero (0) based collection, meaning that the first object in the collection is referenced by the index 0, instead of 1.

Example

The following example returns the ItemProperties collection associated with a MailItem object.

Sub ItemProperty()
'Creates a new mail item and accesses its properties

    Dim olApp As Outlook.Application
    Dim objMail As MailItem
    Dim objItems As ItemProperties
    Dim objItem As ItemProperty

    Set olApp = Outlook.Application
    'Create the mail item
    Set objMail = olApp.CreateItem(olMailItem)
    'Create a reference to the item's properties collection
    Set objItems = objMail.ItemProperties
    'Create a reference to the first item property page
    Set objItem = objItems.Item(0)

End Sub