편집

다음을 통해 공유


Explorer.Activate method (Outlook)

Activates an explorer window by bringing it to the foreground and setting keyboard focus.

Syntax

expression.Activate

expression A variable that represents an Explorer object.

Example

This Microsoft Visual Basic for Applications example responds to the NewMail event by activating the explorer window. The sample code must be placed in a class module, and the Initialize_handlers routine must be called before the event procedure can be called by Microsoft Outlook.

Public WithEvents myOlExp As Outlook.Explorer 
 
Public Sub Initialize_handlers() 
 Set myOlExp = Application.ActiveExplorer 
End Sub 
 
Private Sub NewMail() 
 myOlExp.Activate 
End Sub

See also

Explorer Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.