P
Paulem0071
Does anyone have any experience displaying an existing MailItem with a custom
MessageClass?
When I filter and retrieve an affected Mailtem, I get an
DISP_E_MEMBERNOTFOUND exception when calling mailitem.Display(false)
Here is a code excerpt:
string filter = @"@SQL=(""urn:schemas:httpmail:subject"" like '%test%' ";
filter = filter + @" AND
""http://schemas.microsoft.com/mapi/proptag/0x001a001e"" =
'IPM.Note.Special.Note)";
Outlook.Items items = (Outlook.Items)folder.Items.Restrict(filter);
foreach (object o in items)
{
OutlookMailItem f = o as Outlook.MailItem;
//this fails with DISP_E_MEMBERNOTFOUND
f.GetInspector.Display(false);
//so does this
f.Display(false);
//just do one
break;
}
Thanks a lot.
MessageClass?
When I filter and retrieve an affected Mailtem, I get an
DISP_E_MEMBERNOTFOUND exception when calling mailitem.Display(false)
Here is a code excerpt:
string filter = @"@SQL=(""urn:schemas:httpmail:subject"" like '%test%' ";
filter = filter + @" AND
""http://schemas.microsoft.com/mapi/proptag/0x001a001e"" =
'IPM.Note.Special.Note)";
Outlook.Items items = (Outlook.Items)folder.Items.Restrict(filter);
foreach (object o in items)
{
OutlookMailItem f = o as Outlook.MailItem;
//this fails with DISP_E_MEMBERNOTFOUND
f.GetInspector.Display(false);
//so does this
f.Display(false);
//just do one
break;
}
Thanks a lot.