Compartilhar via


ItemProperties Collection

Multiple objects
ItemProperties
ItemProperty

A collection of all properties associated with the item.

Using the ItemProperties collection

Use the ItemProperties property to return the ItemProperties collection. Use ItemProperties.Item(index), where index is the name of the object or the numeric position of the item within the collection, to return a single ItemProperty object. The following example creates a new MailItem object and stores its ItemProperties collection in a variable called objItems.

Sub ItemProperty()
'Creates a new MailItem and access 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 properties collection
    Set objItems = objMail.ItemProperties
    'Create a reference to the item property page
    Set objItem = objItems.item(0)

End Sub

Use the Add method to add a new item property to the ItemProperties collection. Use the Remove method to remove an item property from the ItemProperties collection.

Note     You can only add or remove custom properties. Custom properties are denoted by the IsUserProperty.

Note  The ItemProperties collection is zero-based, meaning that the first item in the collection is referenced by 0, instead of 1.

Properties | Application Property | Class Property | Count Property | Parent Property | Session Property

Methods | Add Method | Item Method | Remove Method

Parent Objects | AppointmentItem Object | ContactItem Object | DistListItem Object | DocumentItem Object | Exception Object | JournalItem Object | MailItem Object | MeetingItem Object | NoteItem Object | PostItem Object | RemoteItem Object | ReportItem Object | TaskItem Object | TaskRequestAcceptItem Object | TaskRequestDeclineItem Object | TaskRequestItem Object | TaskRequestUpdateItem Object

Child Objects