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

 

 

To automatically set a reminder for birthdays for new contacts

When you create a new contact and specify a birthdate, Microsoft Outlook automatically creates a recurring annual event in the Calendar folder for contact's birthday, but it doesn't set a reminder unless you have Outlook set to add a reminder to all new appointments (and in that case, it uses the default reminder time, usually 15 minutes).

The VBA code below uses the MAPIFolder.Items.ItemAdd event to monitor the folder for new items and automatically adds a reminder for XX number of days before the birthday, with that number set in the #### USER OPTIONS #### section of the code. Place the code in the built-in ThisOutlookSession module.

Code Sample

 

Notes

In addition to the ItemAdd event, the Items collection also supports an ItemChange event. You could use the code from the mcolCalItems_ItemAdd procedure in an ItemChange event handler to set reminders when users add or change a birthday in an existing item.

Another use for these events would be to remove the birthday event added to the calendar automatically by Outlook. Instead of using the Save method to save changes to the AppointmentItem, you'd use the Delete method to remove it.

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