Many users want to group their contacts by birthday month in Outlook. Yet, there is not a “Birthday Month” field available by default. Thus, this article will teach you to add such a field and then group contacts by this field.
Sometimes, you may want to group contacts by birthday information. However, by default, Outlook only allows you to group by concrete date of birthday, which will make contact list considerably messy. More often than not, what you long for is grouping by the month of birthday. In this situation, you have to firstly add a “Birthday Month” field, which can be realized with Outlook VBA. Here we’ll show the detailed steps to you.
Group Contacts by Birthday Month in List View
- To start with, launch your Outlook application.
- Then, open VBA editor according to “How to Run VBA Code in Your Outlook”/
- Next, copy and paste the following VBA code into a module.
Sub AddBirthdayMonthField_Contacts() Dim objContactsFolder As Outlook.Folder Dim objItem As Object Dim objContact As Outlook.ContactItem Dim objNewProperty As Outlook.UserProperty Dim strBirthdayMonth As String 'Select a Contacts folder Set objContactsFolder = Outlook.Application.Session.PickFolder 'Add "Birthday Month" field to all contacts If Not objContactsFolder Is Nothing Then If objContactsFolder.DefaultItemType = olContactItem And objContactsFolder.Items.Count > 0 Then For Each objItem In objContactsFolder.Items If TypeName(objItem) = "ContactItem" Then Set objContact = objItem Set objProperties = objContact.UserProperties Set objNewProperty = objContact.UserProperties.Find("Birthday Month", True) If objNewProperty Is Nothing Then Set objNewProperty = objContact.UserProperties.Add("Birthday Month", olText, True) End If If objContact.Birthday = #1/1/4501# Then strBirthdayMonth = "None" Else strBirthdayMonth = Format(objContact.Birthday, "mmmm") End If objNewProperty.Value = strBirthdayMonth objContact.Save End If Next End If End If End Sub
- After that, you can run this macro by pressing “F5” key.
- Subsequently, you will be required to select a specific Contacts folder.
- When the macro completes, exit the VBA editor.
- Next, head to the specific Contacts folder in Outlook.
- Then, switch to “View” tab and click “Change View” > “List”.
- After that, click “View Settings” button.
- In the popup dialog box, click “Group By” button.
- Next, in the subsequent dialog box, take following steps:
- First, opt for “User-defined fields in folder from the drop down list under “Select available fields from”.
- Then, choose “Birthday Month” in “Group items by”.
- Lastly, click a series of “OK” until all dialog boxes are closed.
- When you return to the contacts folder, you will see that all the contacts have been grouped by birthday month, like the screenshot below:
Find Back Valuable Outlook Data
Outlook is prone to corruption, thus it is inevitable for regular users to encounter annoying Outlook PST issues, like virus attacks, software failures or corrupt PST file. Under all these circumstances, you could firstly take recourse to the internal repair tool – Scanpst. However, if it also makes no effect, you can proceed to take aid of a formidable external utility, such as DataNumen Outlook Repair.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including fix sql and outlook repair software products. For more information visit www.datanumen.com