Strange Problem with Outlook 2003

P

prashant.tambe

Hi,

I am writing an Outlook addin using C++/ATL. I want to access the
Message recipients when the message is sent.

Here is what i am doing
1. Advising for the ItemSend Event
2. In the ItemSend callback, I am starting a thread (used to display a
GUI with list of all the recipients). I am passing the _MailItem to
this thread (I am marshalling the _MailItem before passing it to the
thread and unmarshalling it in the thread)
3. In the thread, I am reading the Recipients from the _MailItem and
displaying it on the GUI.

The above is working fine for Outlook 2007,
But occasionally for same set of recipients in Outlook 2003 the count
returned by the Recipients collection is less, then the actual count.

Has anyone seen this ? Is this a bug with outlook 2003 ?

Thanks in advance
Prashant
 
D

Dmitry Streblechenko

Do not display any UI on a thread other than the main Outlook thread.
Do you see the wrnog number of recipients if you read them immediately in
the ItemSend event?

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

prashant.tambe

Hi Dmitry,

I tried to get the recipient count immediately in the ItemSend and its
correct,
I will check if it works if I display the UI in same thread thread

Many Thanks,
Prashant
 
P

prashant.tambe

Dmitry,

I tried dislaying the UI in the Outlook main thread and it seems to
work, but now i am facing another issue.

When the ItemSend returns its causing the Outlook to ShutDown, I am
not seeing any exceptions in the debug output.

Thanks,
Prashant
 

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