> Is that a typo with the missing single quote after the name of your custom
> MessageClass? Have you checked the returned restricted Items collection to
> see if the items.Count property is greater than 0?
>
> --
> Ken Slovak
> [MVP - Outlook]
>
http://www.slovaktech.com> Author: Professional Programming Outlook 2007.
> Reminder Manager, Extended Reminders, Attachment Options.
>
http://www.slovaktech.com/products.htm>
>
> "Paulem0071" <Paulem0071[ at ]discussions.microsoft.com> wrote in message
> news:5A62D0F8-57E2-41CC-8EC7-AE5BE7F9960A[ at ]microsoft.com...
> > 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 = [ at ]"[ at ]SQL=(""urn:schemas:httpmail:subject"" like '%test%'
> > ";
> > filter = filter + [ at ]" 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.
> >
>
>