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


Kutools for Outlook - Brings 100 Advanced Features to Outlook, and Make Work Much Easier!

  • Auto CC/BCC by rules when sending email; Auto Forward Multiple Emails by custom; Auto Reply without exchange server, and more automatic features...
  • BCC Warning - show message when you try to reply all if your mail address is in the BCC list; Remind When Missing Attachments, and more remind features...
  • Reply (All) With All Attachments in the mail conversation; Reply Many Emails in seconds; Auto Add Greeting when reply; Add Date into subject...
  • Attachment Tools: Manage All Attachments in All Mails, Auto Detach, Compress All, Rename All, Save All... Quick Report, Count Selected Mails...
  • Powerful Junk Emails by custom; Remove Duplicate Mails and Contacts... Enable you to do smarter, faster and better in Outlook.
shot kutools outlook kutools tab 1180x121
shot kutools outlook kutools plus tab 1180x121
 
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.
    Jacobo Eluani · 17 days ago
    Hola me sale este error, que hago?
    • To post as a guest, your comment is unpublished.
      Jacobo Eluani · 17 days ago
      El codigo de este proyecto se debe actualizar para usarse en sistemas de 64 bits. Revise y actualice las instrucciones Declare y, a continuación, márquelas con el atributo PtrSafe
      • To post as a guest, your comment is unpublished.
        Jacobo Eluani · 17 days ago
        ya pude solucionar el tema de PtrSafe, ahora me marca que no se ha definido Sub o Function; señalando en amarillo Private Sub Application_Startup() y señalando en azul GetSystemMetrics32, ahora si no me deja correr la macro, que hago?
        • To post as a guest, your comment is unpublished.
          Jacobo Eluani · 17 days ago
          Ya pude resolver el tema de arriba, ahora solo quiero las ventanas de inbox y task se abran de la siguinete manera (eliminando del codigo las ventanas calendario y contactos).


          Task en mi pantalla secundaria (me gustaría saber como definir la posición de la pantalla que lo quiero y los pixeles) y el inbox en pantalla completa en mi monitor principal, me pueden ayudar?

          Saludos!
  • To post as a guest, your comment is unpublished.
    Chris · 1 years 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 · 1 years 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