很好地阅读Outlook mailitem属性 [英] nicely reading outlook mailitem properties
问题描述
我正在为Outlook 2007编写一个插件,我想读取MailItem的属性.
I am writing a plugin for outlook 2007 and i would like to read a property of a MailItem.
我特别想知道附件的所有内容类型.现在,我现在的方式是这样的:
In particular i'd like to know all the content-types of my attachments. Now the way i do this now is something like this:
Outlook.MailItem item = OutlookItem as Outlook.MailItem;
Outlook.Attachments itt = item.Attachments;
foreach (Outlook.Attachment t in item.Attachments)
{
textBox1.Text += t.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x370E001F");
}
但是我宁愿只是打个电话.
But I would much rather just call something like.
t.PropertyAccessor.GetProperty(PR_ATTACH_MIME_TAG);
您以后无法使用该选项,但是该属性在msdn文档中以这种方式提及. (http://msdn.microsoft.com/zh-cn/library/ms879575.aspx).有谁知道如何在不使用字符串而是使用常量的情况下很好地检索属性?
I can't get that later option to work thou, however the property is mentioned that way in the msdn documentation. (http://msdn.microsoft.com/en-us/library/ms879575.aspx). Does anyone know how to nicely retrieve property's without using the string but the constant instead?
推荐答案
推荐使用的方法
这篇关于很好地阅读Outlook mailitem属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!