Startup Event

Occurs when Microsoft Outlook is starting, but after all add-in programs have been loaded. This event is not available in Microsoft Visual Basic Scripting Edition (VBScript).


*object   * An expression that evaluates to an Application object.


An Outlook Visual Basic for Applications (VBA) macro can use this event procedure to initialize itself when Outlook starts.


This Microsoft Outlook Visual Basic for Applications 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

Applies to | Application Object

See Also | NewExplorer Event | NewInspector Event | Quit Method | Using events with Automation