You can add a custom field to a Microsoft Outlook contact and use the following formula to calculate the age. This code for an Outlook formula field on a Contact item or in a Contacts folder gives you the “real age” for everyone except those fortunate few born on Feb. 29 in a leap year:
IIf([Birthday]<>"None",DateDiff("yyyy",[Birthday],Date())-IIf(DateDiff("d", CDate(Month([Birthday]) & "/" & Day([Birthday]) & "/" & Year(Date())),Date())<0,1,0),"")DateDiff by itself is inadequate, because it will round up if the birthday has not yet occurred during the current year.
A simpler formula, (Now() – [Birthday] ) /365 also rounds the closest whole age: less than 6 months until the next birthday and it reports the age at the next birthday, not the current age.
Template showing the Contacts age – because this custom form has a custom field, it either needs to be published or opened using the Choose Form dialog in Outlook 2010 and 2007. Also, the custom fields cannot be added to the “front” page in Outlook 2003 and up. If you edit the first page, the “pretty” contact card reverts to the old contact card look in older versions of Outlook. This sample contact and formula works in all versions of Microsoft Outlook.
See How to create a custom appointment form that displays a person’s current age in Microsoft Outlook calendar for a way to add the current age to the subject line of a birthday event.
To apply a custom form to existing contacts, you need to change the message class. You can do this with DocMessageClass, a free utility used to change forms used on Outlook items.
More Information
Articles that may interest you:
Last reviewed on Mar 28, 2012

Hot Topics