Skip to content

Latest commit

 

History

History
64 lines (33 loc) · 1.34 KB

Outlook.Explorer.Activate(even).md

File metadata and controls

64 lines (33 loc) · 1.34 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Explorer.Activate event (Outlook)
vbaol11.chm449
vbaol11.chm449
Outlook.Explorer.Activate
8543d347-baf5-cdc9-2366-11c9917e035e
06/08/2017
medium

Explorer.Activate event (Outlook)

Occurs when an explorer becomes the active window, either as a result of user action or through program code.

Syntax

expression.Activate

expression A variable that represents an Explorer object.

Remarks

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

Example

This code example uses the WindowState property to maximize the topmost explorer window when the Activate event occurs. 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.

Public WithEvents myOlExp As Outlook.Explorer 
 
 
 
Public Sub Initialize_handler() 
 
 Set myOlExp = Application.ActiveExplorer 
 
End Sub 
 
 
 
Private Sub myOlExp_Activate() 
 
 If myOlExp.WindowState = olNormalWindow Then _ 
 
 myOlExp.WindowState = olMaximized 
 
End Sub

See also

Explorer Object

[!includeSupport and feedback]