我正在寻找一些方法来分类(AIP附件)电子邮件通过VBA。到目前为止,我们已经使用了标记Outlook addon的文档。在这里,我使用了命令:
Tag.applicationForMacro.MacroOutlookClassify(something)发布于 2020-05-19 14:52:31
AIP标签通过使用用户属性存储在Outlook项中。可以使用PropertyAccessor.GetProperty方法获取自定义属性值:
Sub DemoPropertyAccessorGetProperty()
Dim PropName, Header As String
Dim oMail As Object
Dim oPA As Outlook.PropertyAccessor
'Get first item in the inbox
Set oMail = _
Application.Session.GetDefaultFolder(olFolderInbox).Items(1)
'PR_TRANSPORT_MESSAGE_HEADERS
PropName = "http://schemas.microsoft.com/mapi/proptag/0x007D001E"
'Obtain an instance of PropertyAccessor class
Set oPA = oMail.PropertyAccessor
'Call GetProperty
Header = oPA.GetProperty(PropName)
Debug.Print (Header)
End Sub我建议使用MFCMapi或OutlookSpy来探索Outlook项的低级别属性。
https://stackoverflow.com/questions/61890428
复制相似问题