When checking a contact’s birthday, sometimes you may want to quickly jump to the date in calendar to check the schedule on that date. Now, this article will tell you how to get it in quick time.
To jump to a specific date in calendar, you can press “Ctrl + G” key shortcut. It will display the “Go To Date” small dialog box. In it, you can input the specific date, as shown in the following screenshot. Thus, if you want to jump to a contact’s birthday, by this means, you have to firstly write down its birthday and then launch “Go To Date” dialog. It is a bit tedious. Hence, here we will teach you another way, which is much more efficient and handier.
Quickly Jump to a Contact’s Birthday in Calendar
- For a start, launch Outlook application.
- Then, go to VBA editor by referring to the article – “How to Run VBA Code in Your Outlook“.
- Next, in VBA editor, copy the following VBA code to the “ThisOutlookSession” project.
'Create a Custom Context Menu Option of Contact Sub Application_ItemContextMenuDisplay(ByVal CommandBar As Office.CommandBar, ByVal Selection As Selection) Dim objCommandBarButton As Office.CommandBarButton If Selection.Count = 1 Then Set objCommandBarButton = CommandBar.Controls.Add(msoControlButton) With objCommandBarButton .Style = msoButtonIconAndCaption .Caption = "Go To Birthday" .FaceId = 1795 .OnAction = "Project1.ThisOutlookSession.GoToBirthday" End With End If Set objCommandBarButton = Nothing End Sub Sub GoToBirthday() Dim objSelectedContact As Outlook.ContactItem Dim dBirthday As Date Dim objCalendar As Outlook.Folder Dim objView As Outlook.View Dim objCalendarView As Outlook.CalendarView Set objSelectedContact = Outlook.Application.ActiveExplorer.Selection.Item(1) If objSelectedContact.Birthday <> #1/1/4502# Then dBirthday = Month(objSelectedContact.Birthday) & "/" & Day(objSelectedContact.Birthday) & "/" & Year(Date) Set objCalendar = Outlook.Application.Session.GetDefaultFolder(olFolderCalendar) Set Application.ActiveExplorer.CurrentFolder = objCalendar Set objView = ActiveExplorer.CurrentFolder.Views.Item("Calendar") objView.Apply Set objCalendarView = Application.ActiveExplorer.CurrentView 'Change the Calendar View Settings to your liking With objCalendarView .CalendarViewMode = olCalendarViewDay .DayWeekFont.Name = "Comic Sans MS" .DayWeekFont.Size = 8 .DayWeekTimeFont.Name = "Comic Sans MS" .DayWeekTimeFont.Size = 16 .Save 'Go to the Birthday .GoToDate dBirthday End With Else MsgBox "The contact has no birthday information!", vbExclamation + vbOKOnly End If End Sub
- After that, exit the VBA editor properly.
- Subsequently, select a contact and right click on it.
- Next, from the popup context menu, select the “Go To Birthday” option.
- At once, Outlook will access the Calendar and go to the date of the contact’s birthday.
Safeguard Precious Outlook Data
Since Outlook is susceptible to corruption, if you would like to block Outlook data loss, you ought to make some essential precautions. For example, you need stick to making regular data backups. Additionally, in order to provide immediate and effective rescue, you had better get hold of powerful Outlook repair software, like DataNumen Outlook Repair. It is able to fix Outlook issues in a jiffy.
Author Introduction:
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including repair sql and outlook repair software products. For more information visit www.datanumen.com
Leave a Reply