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);
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?