interface on a mail item object. It seems like it should be pretty
straight-forward but given an IDispatch to a mail item I've gotten
a _MailItem interface (which works fine) and with that I've tried
to get the IMessage interface through the MAPIOBJECT property of the
_MailItem. Unfortunately, I can't seem to get a valid interface!
I've even tried creating a TMessage (from the CDO import) and
calling ConnectTo with the IMessage. (I realize that I had already
established that IMessage was not working, but I went through the
exercise anyway.) Any input on what I'm doing wrong would be
appreciated.
Regards,
Joel
If your code runs in a separate (from Outlook) process or in a thread that you
have created, you must initialize MAPI first by calling MAPIInitialize(...)
before you access any Extended MAPI interfaces, including the sample above. Call
MAPIUninitialize() when you are done.
Extended MAPI headers for Delphi are available on my site - see my signature
(click OutlookSpy, then Resources).
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
"Joel Brinkman" <joel.b...@remooove.j3ee.com> wrote in message
news:OSIaQVlABHA.1268@tkmsftngp07...
Again, thanks very much!
Regards,
Joel
"Dmitry Streblechenko" <dmi...@dimastr.com> wrote in message
news:OzdDcdlABHA.1412@tkmsftngp07...