No, Extended MAPI can only be used from C++ or Delphi, but not from VB.
You can check whether the message has the properties you are after using
MdbView or OutlookSpy (click IMessage).
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Codex" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Dmitry,
>
> Thanks. If I was writing in VC++ or Visual Basic, however, I'd be
> able to get at and use this Extended MAPI object. Is that right?
>
> I'm trying to access this so that I can get at the message-ID's and
> the "in reply to" field of the headers. I read one posting suggesting
> that these won't exist for email sent among MS exchange servers. Is
> that correct?
>
> - Codex
>
> "Dmitry Streblechenko" <(E-Mail Removed)> wrote in message
news:<(E-Mail Removed)>...
> > MAPIOBJECT returns an Extended MAPI IMessage, not CDO.IMessage. .Net
> > languages (just like the previous versions of VB) cannot use Extended
MAPI.
> >
> > Dmitry Streblechenko (MVP)
> > http://www.dimastr.com/
> > OutlookSpy - Outlook, CDO
> > and MAPI Developer Tool
> >
> >
> > "Codex" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed)...
> > > In C# add-ins for outlook, my understanding is that the
> > > Outlook.MailItem.MAPIOBJECT refers to an IMessage item from which we
> > > can extract the mail headers.
> > >
> > > Further, I understand that in other languages, you can use the
> > > QueryInterface method to get the IMessage object from MAPIOBJECT.
> > >
> > > C# does not have a QueryInterface method. I've tried typecasting
> > > MAPIOBJECT to CDO.IMessage, but I get a typecast exception.
> > >
> > > How do I get the IMessage item from Outlook.MailItem.MAPIOBJECT
> > >
> > > Thanks,
> > > -Codex