ItemProperty 对象

         
ItemProperties
ItemProperty
NameSpace

包含有关指定的项目属性的信息。每个项目属性都定义了项目的某个特性(例如项目的名称、类型或值等)。ItemProperty 对象是 ItemProperties 集合的成员。

使用 ItemProperty 对象

使用 ItemProperties.Item(index) 返回单个 ItemProperty 对象,其中 index 是对象在集合中的数字位置或对象名称。以下示例创建对 ItemProperties 集合中第一个 ItemProperty 对象的引用。

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