If you desire to keep some specific calendars overlaid when you switch to calendar area in your Outlook, you can refer to this article. We will share you a piece of VBA code. It can help you realize it with effortless ease.
To view several calendars at the same time in your Outlook, you can overlay the calendars. In this way, all appointments and meetings of these overlaid calendars will be shown in one page, but in different colors. Unquestionably, it’s very handy. Thus, if you would like to keep several calendars overlaid whenever you shift to the calendar area, you can use the following method to get it.
Auto Overlay Specific Calendars When Switching to Calendar Area
- To start with, launch your Outlook program.
- Then press “Alt + F11” key buttons in the main Outlook window.
- Next you will get access to the Outlook VBA editor, in which you need to find and open the “ThisOutlookSession” project.
- After that, you ought to copy the following VBA code into this project.
Public WithEvents objNavigationPane As NavigationPane Private Sub Application_Startup() Set objNavigationPane = Application.ActiveExplorer.NavigationPane End Sub Private Sub objNavigationPane_ModuleSwitch(ByVal CurrentModule As NavigationModule) Dim objCurrentView As Outlook.View Dim objCalendarModule As CalendarModule Dim objNavigationGroup As NavigationGroup Dim objNavigationFolder As NavigationFolder Set objCurrentView = Application.ActiveExplorer.CurrentView On Error Resume Next 'Change the current view of "Calendar" folder to "Calendar" If objCurrentView.Name <> "Calendar" Then Application.ActiveExplorer.CurrentFolder.Views("Calendar").Apply End If 'When switching to "Calendar" area If CurrentModule.NavigationModuleType = olModuleCalendar Then Set objCalendarModule = objNavigationPane.Modules.GetNavigationModule(olModuleCalendar) Set objNavigationGroup = objCalendarModule.NavigationGroups.GetDefaultNavigationGroup(olMyFoldersGroup) For i = 1 To objNavigationGroup.NavigationFolders.count Set objNavigationFolder = objNavigationGroup.NavigationFolders.Item(i) Select Case i 'Change calendar index numbers you want to open Case 1, 2, 3, 5 objNavigationFolder.IsSelected = True 'Overlay the specific Calendar folders objNavigationFolder.IsSideBySide = False Case Else objNavigationFolder.IsSelected = False End Select Next End If End Sub
- Subsequently, you have to sign this code. Hit the “Tools” button in the toolbar and choose “Digital Signature” option from the drop down list.
- In the popup dialog box, you can follow the onscreen instructions to achieve it.
- Later you can change Outlook macro settings to permit the signed macros.
- Eventually, you can restart your Outlook application.
- From now on, every time when you switch to the “Calendar” area, the specific calendars will be overlaid, like the screenshot below:
Retrieve Data from Damaged Outlook File
Outlook is widely used no matter among individuals or businesses. But, even so, it still cannot be exempt from errors and crashes. If your Outlook frequently gets crashed, your Outlook PST data will be susceptible to damage. At that time, what you can firstly resort to is the inbox repair tool – Scanpst.exe. If unfortunately it fails, you have no choice but to take recourse to a robust external repair utility, such as DataNumen Outlook Repair, which can restore your PST data with utmost ease.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including sql corruption and outlook repair software products. For more information visit www.datanumen.com