How to import birthdays from Excel to Outlook calendar?
If you have a long list of birthday information in a worksheet, now, you want to import these birthdays into your Outlook calendar as events. How could you deal with this task with some quick methods?
Normally, there is no direct way to import the birthdays to Outlook calendar, here, I will create a VBA code to solve this problem, please do with the following steps:
1. Open the worksheet that contains the birthdays that you want to import to Outlook, and then hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. Click Insert > Module, and paste the following code in the Module Window.
VBA code: Import birthdays to Outlook calendar
Sub ImportBirthdaysToCalendar() 'Updateby ExtendOffice Dim xWs As Excel.Worksheet Dim xRng As Range Dim xOlApp As Outlook.Application Dim xCalendarFld As Outlook.Folder Dim xAppointmentItem As Outlook.AppointmentItem Dim xRecurrencePattern As Outlook.RecurrencePattern Dim xRow As Integer On Error Resume Next Set xWs = ThisWorkbook.ActiveSheet Set xRng = Application.InputBox("Please select the data range (only two columns):", "Kutools for Excel", , , , , , 8) If xRng Is Nothing Then Exit Sub If xRng.Columns.Count <> 2 Then MsgBox "You can only select two columns", vbOKOnly + vbCritical, "Kutools for Excel" Exit Sub End If Set xOlApp = CreateObject("Outlook.Application") Set xCalendarFld = xOlApp.Session.GetDefaultFolder(olFolderCalendar) For xRow = 1 To xRng.Rows.Count Set xAppointmentItem = xCalendarFld.Items.Add("IPM.Appointment") With xAppointmentItem .Subject = xRng.Cells(xRow, 1) & Chr(39) & "s Birthday" .AllDayEvent = True .Start = xRng.Cells(xRow, 2) Set xRecurrencePattern = .GetRecurrencePattern xRecurrencePattern.RecurrenceType = olRecursYearly .Save End With Next Set xWs = Nothing Set xCalendarFld = Nothing Set xOlApp = Nothing End Sub
3. Still in the Microsoft Visual Basic for Applications window, click Tools > References. In the popped out References – VBAProject dialog box, check Microsoft Outlook 16.0 Object Library option form the Available References list box, see screenshot:
4. Then click OK to close this dialog box. Now, press F5 key to run this code, and a prompt box is popped out, please select the name and birthday columns, see screenshot:
5. And then, click OK button, the birthdays will be imported into the Outlook calendar at once, you can launch your Outlook to view the result, see screenshot:
Best Office Productivity Tools
Kutools for Outlook - Over 100 Powerful Features to Supercharge Your Outlook
📧 Email Automation: Out of Office (Available for POP and IMAP) / Schedule Send Emails / Auto CC/BCC by Rules When Sending Email / Auto Forward (Advanced Rules) / Auto Add Greeting / Automatically Split Multi-Recipient Emails into Individual Messages ...
Over 100 Features Await Your Exploration! Click Here to Discover More.