View Single Post
  #6  
Old July 10th 07, 01:26 PM posted to microsoft.public.outlook.program_addins
Ivan
external usenet poster
 
Posts: 39
Default How to access message recipients (MAPI)

Dmitry, is it possible to open each message avoiding of calling
OpenEntry(msgEntryID)? It takes high time.

Now I open mapi folder using spIMsgStore-OpenEntry(), then open mapi table
- spIFolder-GetContentsTable(), query all rows from the table (also using
SetColumns() to access only one property - PR_ENTRYID), and after that I
should open each message using spFolder-OpenEntry() to have an ability to
call GetRecipientTable() method.

What if I need to read only all recipients for each message without reading
other message properties?

In MSDN I found that contents of PR_MESSAGE_RECIPIENTS should be accessed by
the IMAPIProp::OpenProperty method, requesting the IID_IMAPITable interface
identifier. But I have no idea how to realize it.

The fact is that Reunion's Outlook Addin (www.reunion.com) read all
recipients from all messages extremely fast (only first launch is meaningful
cause it cashes results in its own db).
Ads