Vba 在Outlook 2007宏中从internet标头访问邮件Id属性

Vba 在Outlook 2007宏中从internet标头访问邮件Id属性,vba,outlook,Vba,Outlook,在outlook 2007宏中,我可以访问internet标头属性,但我不知道如何指向它的Message Id属性。有人能帮我吗 使用MailItem.PropertyAccessor.GetProperty访问PR_TRANSPORT_MESSAGE_头并对其进行解析以提取邮件id strHeaders = YourMailItem.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x007D001

在outlook 2007宏中,我可以访问internet标头属性,但我不知道如何指向它的Message Id属性。有人能帮我吗

使用
MailItem.PropertyAccessor.GetProperty
访问PR_TRANSPORT_MESSAGE_头并对其进行解析以提取邮件id

strHeaders = YourMailItem.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x007D001F")
将提取整个标题

messageId = ActiveExplorer.Selection.Item(1).PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x1035001F")

相反,它将只返回message id属性。

否,没有您迄今为止尝试过的代码。有关所需信息,请参阅。
messageId = ActiveExplorer.Selection.Item(1).PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x1035001F")