Application.Startup Event (Outlook)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Occurs when Microsoft Outlook is starting, but after all add-in programs have been loaded.

expression .Startup

expression A variable that represents an Application object.

This event is not available in Microsoft Visual Basic Scripting Edition (VBScript).

An Outlook macro can use this event procedure to initialize itself when Outlook starts.

This Microsoft Visual Basic for Applications (VBA) example displays a welcome message to the user and maximizes the Outlook explorer window when Outlook starts.

Private Sub Application_Startup() 
 
 MsgBox "Welcome, " & Application.GetNamespace("MAPI").CurrentUser 
 
 Application.ActiveExplorer.WindowState = olMaximized 
 
End Sub
Show: