Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

How to open multiple outlook windows automatically when Outlook starts? 

When you launch Outlook account, the Mail window is opened as normal. Is it possible to automatically open other Outlook windows, such as Mail, Calendar, Contacts and Tasks windows at the same time when Outlook starts?

Open multiple outlook windows automatically when Outlook starts with VBA code


Open multiple outlook windows automatically when Outlook starts with VBA code

Here, I can introduce a VBA code to help you opening multiple Outlook windows, such as Mail, Calendar, Contacts and Tasks windows immediately when launching Outlook. Please do as this:

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, double click ThisOutlookSession from the Project1(VbaProject.OTM) pane to open the module, and then copy and paste the following code into the blank module.

VBA code: Open multiple outlook windows automatically when Outlook starts:

Private Sub Application_Startup()
Dim xCalendar As Folder
Dim xTasks As Folder
Dim xContacts As Folder
Dim xInbox As Folder
Dim xExplorer As Outlook.Explorer
Dim xWidth, xHeight As Integer
On Error Resume Next
xWidth = Int(GetSystemMetrics32(0) / 4) + 60
xHeight = GetSystemMetrics32(1)
Set xInbox = Outlook.Application.ActiveExplorer.CurrentFolder
xInbox.Display
Set Application.ActiveExplorer.CurrentFolder = xInbox
Set xExplorer = Application.ActiveExplorer
With xExplorer
    .WindowState = olNormalWindow
    .Top = 0
    .Left = 0
    .Height = xHeight
    .Width = xWidth
End With
Set xCalendar = Outlook.Session.GetDefaultFolder(olFolderCalendar)
xCalendar.Display
Set xExplorer = Application.ActiveExplorer
With xExplorer
    .WindowState = olNormalWindow
    .Top = 0
   .Left = xWidth
    .Height = xHeight
    .Width = xWidth
End With
Set xContacts = Outlook.Session.GetDefaultFolder(olFolderContacts)
xContacts.Display
Set xExplorer = Application.ActiveExplorer
With xExplorer
    .WindowState = olNormalWindow
    .Top = 0
    .Left = xWidth * 2
    .Height = xHeight
    .Width = xWidth
End With
Set xTasks = Outlook.Session.GetDefaultFolder(olFolderTasks)
xTasks.Display
Set xExplorer = Application.ActiveExplorer
With xExplorer
    .WindowState = olNormalWindow
    .Top = 0
    .Left = xWidth * 3
    .Height = xHeight
    .Width = xWidth
End With
End Sub

doc open multiple windows startup 1

3. Then go on clicking Insert > Module, copy and paste below code into the opened blank module, see screenshot:

Declare Function GetSystemMetrics32 Lib "user32" Alias "GetSystemMetrics" (ByVal xIndex As Long) As Long

doc open multiple windows startup 2

4. Then save and close the codes, restart the Outlook to take the codes effect. Now, when opening Outlook, the Mail, Calendar, Contacts and Tasks windows will be opened automatically side by side, see screenshot:

doc open multiple windows startup 3

 

Recommended Productivity Tools

shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121

Kutools for Outlook - More than 100 Advanced Functions for Outlook, Improve 70% Efficiency For you

  • Complicated and repeated operations can be done a one-time processing in seconds.
  • Forward multiple emails individually with one-click, and auto forward by rules.
  • Auto CC/BCC every sending email and easy for customizing rules, and auto reply without requiring exchange server.
  • Powerful junk emails filter, remove duplicate emails, reply with attachment, bunch of one-click operations, and so on...
  • 60-day unlimited free trial. 60-day money back guarantee. 2 years free upgrade and support. Buy once, use forever.
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Chris · 9 months ago
    Is there a way to make this open the windows in separate screens? I have 3 screens at my work, and I want to have my inbox open on screen 3, calendar to open on screen 2, and the tasks to open on screen 1, all maximised. Not fussed about the contacts page. Any advice on how to alter that would be appreciated. Currently they all open on the one screen, inbox maximised and calendar/tasks in smaller windows.
    • To post as a guest, your comment is unpublished.
      skyyang · 9 months ago
      Hello, Chris,
      May be the following VBA code can help you to solve your problem. Please try it.

      Private Declare PtrSafe Function GetSystemMetrics32 Lib "User32" Alias "GetSystemMetrics" (ByVal xIndex As Long) As Long
      Private Sub Application_Startup()
      Dim xCalendar As Folder
      Dim xTasks As Folder
      Dim xContacts As Folder
      Dim xInbox As Folder
      Dim xExplorer As Outlook.Explorer
      Dim xWidth As Integer, xHeight As Integer
      On Error Resume Next
      xWidth = GetSystemMetrics32(0)
      xHeight = GetSystemMetrics32(1)
      Set xInbox = Outlook.Application.Session.GetDefaultFolder(olFolderInbox)
      Set Outlook.Application.ActiveExplorer.CurrentFolder = xInbox
      Set xExplorer = Application.ActiveExplorer
      ExplorerDisplay xExplorer, 0
      Set xCalendar = Outlook.Session.GetDefaultFolder(olFolderCalendar)
      xCalendar.Display
      Set xExplorer = Application.ActiveExplorer
      ExplorerDisplay xExplorer, xWidth
      Set xTasks = Outlook.Session.GetDefaultFolder(olFolderTasks)
      xTasks.Display
      Set xExplorer = Application.ActiveExplorer
      ExplorerDisplay xExplorer, (xExplorer.Width + 1) * -1
      End Sub

      Sub ExplorerDisplay(Exp As Explorer, ByVal L As Integer)
      With Exp
      .WindowState = olNormalWindow
      .Top = 0
      .Left = L
      .WindowState = olMaximized
      End With
      End Sub