Explorer.Display Method

Outlook Developer Reference

Displays a new Explorer object for the folder.

Syntax

expression.Display()

expression   A variable that represents an Explorer object.

Remarks

The Display method is supported for explorer and inspector windows for the sake of backward compatibility. To activate an explorer or inspector window, use the Activate method.

If you attempt to open an "unsafe" file system object (or "freedoc" file) by using the Microsoft Outlook object model, you receive the E_FAIL return code in the C or C++ programming languages. In Outlook 2000 and earlier, you could open an "unsafe" file system object by using the Display method.

Example

This Visual Basic for Applications (VBA) example uses the Display method to display the default Inbox folder. This example will not return an error, even if there are no items in the Inbox, because you are not asking for the display of a specific item.

Visual Basic for Applications
  Sub DisplayInbox()
    Dim myNameSpace As Outlook.NameSpace
    Dim myFolder As Outlook.Folder
	
    Set myNameSpace = Application.GetNamespace("MAPI")
    Set myFolder = myNameSpace.GetDefaultFolder(olFolderInbox)
    myFolder.Display
End Sub

See Also