ItemProperty Object
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
ItemProperties ItemProperty NameSpace |
Contains information about a given item property. Each item property defines a certain attribute of the item, such as the name, type, or value of the item. The ItemProperty object is a member of the ItemProperties collection.
Using the ItemProperty object
Use ItemProperties.Item(index), where index is the object's numeric position within the collection or it's name to return a single ItemProperty object. The following example creates a reference to the first ItemProperty object in the ItemProperties collection.
Sub NewMail()
'Creates a new MailItem and references the ItemProperties collection.
Dim olApp As Outlook.Application
Dim objMail As MailItem
Dim objitems As ItemProperties
Dim objitem As ItemProperty
Set olApp = Outlook.Application
'Create a new mail item
Set objMail = olApp.CreateItem(olMailItem)
'Create a reference to the ItemProperties collection
Set objitems = objMail.ItemProperties
'Create reference to the first object in the collection
Set objitem = objitems.item(0)
End Sub