Explorers.Add Method (Outlook)
Creates a new instance of the explorer window.
Syntax
expression .Add(Folder, DisplayMode)
expression A variable that represents an Explorers object.
Parameters
Name |
Required/Optional |
Data Type |
Description |
---|---|---|---|
Folder |
Required |
Variant |
The Variant object to display in the explorer window when it is created. |
DisplayMode |
Optional |
Long |
The display mode of the folder. Can be one of the OlFolderDisplayMode constants. |
Return Value
An Explorer object that represents a new instance of the window.
Remarks
The Folder argument can represent either a Folder object or the URL to that folder.
The explorer window is initially hidden. You must call the Display method of the Explorer object to make it visible.
Example
The following VBA example displays the Drafts folder in an explorer window without a Navigation Pane or Folder List.
Sub DisplayDrafts()
Dim myExplorers As Outlook.Explorers
Dim myOlExpl As Outlook.Explorer
Dim myFolder As Outlook.Folder
Set myExplorers = Application.Explorers
Set myFolder = Application.GetNamespace("MAPI").GetDefaultFolder _
(olFolderDrafts)
Set myOlExpl = myExplorers.Add _
(myFolder, olFolderDisplayNoNavigation)
myOlExpl.Display
End Sub