How to Create an Outlook 2007 AddIn that can select multiple contact folders?

Jul 12, 2011 at 8:37 AM
Edited Jul 13, 2011 at 3:11 AM

Dear C#.NET experts,


I am developing an Outlook 2007 Add-In using Visual Studio 2010, C# for my company.
The goal is to be able to select multiple contact folders, and each folder has multiple contacts within.


In the example below,
http://98.130.241.249/project/img/02.jpg

I have two contact folders: Agency-WEST and Agency-EAST. Both contact folders have multiple contact items within. 

Right now, if I want to send an e-mail to all people in my both contact folders, I have to go to the Agency-WEST folder first, select all contact items, then click the "New Message to Contact button" to have their email addresses appear in the To section of the Message window. 

However, if I just use my mouse to click/select the Agency-WEST contact folder, the "New Message to Contact" won't be visible to click. What I would like to do in my AddIn is to first be able to select/click one contact folder, then click the "New Message to Contact" button, then all contact items' email addresses inside that contact folder will be displayed onto the To section of the Message window. After that, the second step is to be able to select more than one contact folders by holding down the Ctrl button, then click the "New Message to Contact" button, then all selected contact folders' e-mail addresses will be displayed onto the To section of the Message window. From my understanding is that I cannot select more than 1 folder. Is there any alternatives to work this around?

I don't necessary need to use the "New Message to Contact" button. Just would like to know if it's possible write an addin that can allow me to send email to ALL contacts easier.

Also, my understanding is that In Outlook 2007 I cannot manipulate the Selection collection using code and I can only work with the selections the user has made.

Could you kindly advise if my goal is doable?

thanks.

***********************************************************

REV:

 

I have thought about another way of sending an email to batch recipients at once and would like to seek your opinion if my theory makes sense.
 
Write a C#.NET add-in(program) that creates a button or a menu in the following process:
 
Step 1.
Create a new contact folder called combined-folder.
 
Step 2.
Copy all contact items of Agency-WEST that has email addresses into the combined-folder.
Then copy all contact items of Agency-EAST that has email addresses into the combined-folder as well.
Omit all fax numbers and those without email addresses.
Now we have one combined-folder has ALL contacts' email addresses.
 
Step 3.
The user can now use the mouse to select any one of the contact items in the combined-folder, press the Ctrl+A to select all contact items(emails), then the "New Message to Contact" button could be available to click, and all selected email addresses would automatically be copied to the To section of the Message window.
 
Would the above process be easier and more reasonable to implement?