MailItem.ItemProperties 属性 (Outlook)
返回一个 ItemProperties 集合,表示与 Outlook 项目关联的所有标准和用户定义的属性。 此为只读属性。
语法
expression。 ItemProperties
expression 表示 MailItem 对象的变量。
备注
该 ItemProperties 集合是从零开始的集合,表示集合中的第一个对象引用的索引为 0 的。
示例
下面的 Microsoft Visual Basic for Applications (VBA) 示例返回与 MailItem 对象相关联的 ItemProperties 集合。
Sub ItemProperty()
'Creates a new email item and accesses its properties.
Dim objMail As Outlook.MailItem
Dim objItems As Outlook.ItemProperties
Dim objItem As Outlook.ItemProperty
'Create the email item.
Set objMail = Application.CreateItem(olMailItem)
'Create a reference to the email item's properties collection.
Set objItems = objMail.ItemProperties
'Create a reference to the third email item property.
Set objItem = objItems.Item(2)
MsgBox objItem.Name & " = " & objItem.Value
End Sub
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈