Intercept Outlooks' Recipient.Resolve() without Security Warning ??

M

MAPI Minion

I've hit an issue with Outlooks' Object model & the Security patch and
am a bit stuck.

Target system:
Outlook 2k (PST either local, or on Exchange)

I need to intercept the Recipient.Resolve() call generated by Outlook
so that I can get either the users' display name, or email address,
without triggering the Outlook security prompt. Redemption is not an
option for me on this one.

Functionally, what I'm trying to do is capture the text of the "To"
field in an Outlook Inspector for a mail item, either right before, or
right after, resolve call returns. I then want to pass the
recipient(s) name to a COM object running out of process to trigger
some events in my app.

It seems to me that CDO would also hit the security issues that
Outlook has. Which basically leaves MAPI. Can someone point me in the
right direction here?

I've thought of trying to map the Outlook.MailItem to a corresponding
MAPI Entry ID, then dig through the Message store and extract the name
from the IMessage. But I believe the MAPI entry-id won't be available
until / unless the message is physically stored? Is this so? Would it
be available if the user hadn't yet saved the message?

The only other thing I thought might work would be to write my own
MAPI Address Book Provider and have it wrap / chain the Outlook PAB.
Is this possible? Is there an applicable event I could sink off of the
existing PAB instead using a MAPI Advise Sink???

Can anyone think of a better way (there has to be!) of working this
out besides writing a new Address Book Provider?

Regards,

Minion
 
D

Dmitry Streblechenko \(MVP\)

Save the message to make sure all the latest changes are visible to MAPI,
then read the MailItem.MAPIOBJECT property and QI it for the IMessage
Extended MAPI interface.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top