次の方法で共有


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

Concepts

Explorer Object Members

Explorer Object