Outlook Developer Home
Outlook Programmer's Library
 
Outlook Technologies
Outlook Forms
Languages
Samples
Other Technologies

 

 

To automatically add recipients to Contacts in Outlook using VBA

One thing that Outlook 2002 cannot do by itself is automatically create new entries in Contacts for people you send messages to. This is a feature missed by Outlook 2000 Internet Mail Only users, who had an "Automatically put people I reply to in <folder>" option.

This VBA code sample by Sue Mosher provides a way to add recipients automatically. To avoid the Outlook security prompts, it uses the Redemption library, which provides a wrapper for Extended MAPI that does not trigger the Outlook security prompts. You can download the free version of Redemption for personal use. Use Tools | References in VBA to add a reference to the SafeOutlookLibrary for your project.

The Application_ItemSend procedure must be in the built-in ThisOutlookSession module, but the other two procedures can be in any Outlook VBA module. (Press Alt+F11 to open the VBA window.)

Code Sample #1 (Outlook 2003) | Code Sample #2 (Redemption) | More Information

Code Sample #1 (Outlook 2003)

Back to Top

Code Sample #2 (Redemption)

In versions after Outlook 2000 SP2 and before Outlook 2003, you would need to use the Redemption library to avoid security prompts.

Back to Top

More Information

   
2002-7 TurtleFlock, LLC
All right reserved.
About OutlookCode.com

Send comments to webmaster@outlookcode.com

Designed and Implemented by TerraLink USA 

FrontPage Integration
by RobsonDesignWorks

 
 
get Sue's code | forums | share your own code | registration