Outlook View Selection...

Add-in Express™ Support Service
That's what is more important than anything else

Outlook View Selection...
How to quickly get selected items from an Outlook View...? 
Jeff Gilbert

Posts: 36
Joined: 2006-03-31
I'm writing an app to export a list of selected items from an Outlook contact folder. The list would be the name and address info. The user could highlight 1 to many contacts. Attempts at doing this via the object model and the selection collection have proved prohibitivly slllooooowwwwwwwww.

A friend told me it would go blindingly faster if I grabbed the Selection collection via MAPI. But, he had no idea how to accomplish that. Do you guys have any suggestions or code snippets for grabbing a selected items from a contact view quickly?

I just purchased the product yesterday!
Posted 31 Mar, 2006 14:46:10 Top
Sergey Grischenko

Add-in Express team

Posts: 7233
Joined: 2004-07-05
Hi Jeff.

In any case you will have to process the Selection object in Outlook. It can be slow (depending on the number of selected items) regardless whether you use MAPI or not.
As to MAPI, you can use the MAPIOBJECT property of an Outlook items to access it. This property returns the IMAPIProp interface. You can read about the IMAPIProp in MSDN (see the Messaging API (MAPI) chapter).
Also you can download the following example to learn how you can use MAPI interfaces in .NET:
Posted 31 Mar, 2006 16:37:52 Top