This topic has not yet been rated - Rate this topic

Explorer.Deactivate Event (Outlook)

Published: July 16, 2012

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

expression .Deactivate

expression A variable that represents an Explorer object.

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

This Visual Basic for Applications (VBA) example uses the WindowState property to minimize the topmost explorer window when it is not active. 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 Outlook.

Public WithEvents myOlExp As Outlook.Explorer 
 
 
 
Public Sub Initialize_handler() 
 
 Set myOlExp = Application.ActiveExplorer 
 
End Sub 
 
 
 
Private Sub myOlExp_Deactivate() 
 
 myOlExp.WindowState = olMinimized 
 
End Sub

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.