How to Open & Access Different Outlook Areas in Different Windows at the Same Time via VBA

If you want to access Mail, Tasks, Calendar and Contacts areas in different Outlook windows at the same time, you can use the method introduced in this article. It will show new area in new window when switching.

Open & Access Different Outlook Areas in Different Windows at the Same Time via VBABy default, when you switch to another area, the selected target area will be open in the current window. However, many users would like to view different Outlook areas in different windows at the same time. In general, you can click the “Open in New Window” button under “View” tab in ribbon. But it’ll be surely much better if Outlook can auto “Open in New Window”. Now, in the followings, we will expose a piece of VBA code to you, which can realize this in quick time.

Open & Access Different Outlook Areas in Different Windows

  1. In the first place, start your Outlook application.
  2. Then in the main Outlook window, you can press “Alt + F11” key buttons.
  3. Next you can get access to the Outlook VBA editor successfully, in which you need to find and open the “ThisOutlookSession” project.
  4. Subsequently, you need to copy the following VBA code into this project.
Private WithEvents objNavigationPane As NavigationPane
Private objCurrentFolder As Outlook.Folder
 
Private Sub Application_Startup()
    Set objNavigationPane = Outlook.Application.ActiveExplorer.NavigationPane
    Set objCurrentFolder = Outlook.Application.ActiveExplorer.CurrentFolder
End Sub
 
Private Sub objNavigationPane_ModuleSwitch(ByVal CurrentModule As NavigationModule)
    Dim objInboxFolder As Outlook.Folder
    Dim objMailModule As Outlook.NavigationModule
    Dim objCalendarFolder As Outlook.Folder
    Dim objContactsFolder As Outlook.Folder
    Dim objTasksFolder As Outlook.Folder
    Dim objNotesFolder As Outlook.Folder
 
    'Keep main Outlook window staying in "Mail" area
    Set objMailModule = objNavigationPane.Modules.GetNavigationModule(olModuleMail)
    Set objNavigationPane.CurrentModule = objMailModule
 
    'Keep selecting Inbox folder
    Set objInboxFolder = Application.Session.GetDefaultFolder(olFolderInbox)
    DoEvents
    Set Application.ActiveExplorer.CurrentFolder = objInboxFolder
 
    'Show "Calendar", "Contacts", "Tasks" or "Notes" area in new window
    Select Case CurrentModule.NavigationModuleType
           Case olModuleCalendar
                Set objCalendarFolder = Application.Session.GetDefaultFolder(olFolderCalendar)
                objCalendarFolder.Display
           Case olModuleContacts
                Set objContactsFolder = Application.Session.GetDefaultFolder(olFolderContacts)
                objContactsFolder.Display
           Case olModuleTasks
                Set objTasksFolder = Application.Session.GetDefaultFolder(olFolderTasks)
                objTasksFolder.Display
           Case olModuleNotes
                Set objNotesFolder = Application.Session.GetDefaultFolder(olFolderNotes)
                objNotesFolder.Display
    End Select
End Sub

VBA Code - Open Different Outlook Areas in Different Windows

  1. After that, you ought to assign a digital certificate to this new VBA project.
  2. Later continue to alter your Outlook macro security settings to enable signed macros.
  3. Eventually, you can restart your Outlook to activate the new macro.
  4. From now on, when you switch between the different Outlook areas, the selected target area will be opened in a new window, with main Outlook window kept in “Mail” area, like the following screenshot:Open in New Window

What If Your PST File Is in Large Size

To be honest, it is inevitable that your PST file will become increasingly larger as time goes by. Therefore, with your PST file being larger, your Outlook will tend to perform more slowly. Also, the file will be prone to errors and corruption. Once a PST file is damaged, you can recur to an Outlook fix tool, like DataNumen Outlook Repair. However, if possible, you had better split it before it becomes corrupt due to too large file size.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including mdf recovery and outlook repair software products. For more information visit www.datanumen.com

Comments are closed.