This documentation is archived and is not being maintained.

Explorers.NewExplorer Event

Office 2007
Occurs whenever a new explorer window is opened, either as a result of user action or through program code.



expression   A variable that represents an Explorers object.


NameRequired/OptionalData TypeDescription
ExplorerRequiredExplorerThe explorer that was opened.


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

The event occurs after the new Explorer object is created but before the explorer window appears.


This Microsoft Visual Basic/Visual Basic for Applications (VBA) example minimizes the currently active explorer window when a new explorer is about to appear. The sample code must be placed in a class module, and the Initialize_handler routine must be called before the event procedure can be called by Microsoft Outlook.

Visual Basic for Applications
Public WithEvents myOlExplorers As Outlook.Explorers

Public Sub Initialize_handler()
    Set myOlExplorers = Application.Explorers
End Sub

Private Sub myOlExplorers_NewExplorer(ByVal Explorer As Outlook.Explorer)
    If TypeName(Application.ActiveExplorer) <> "Nothing" Then
        Application.ActiveExplorer.WindowState = olMinimized
    End If
End Sub