IsPaneVisible Method

Microsoft Outlook Visual Basic

Show All

IsPaneVisible Method

       

Determines whether a specific explorer pane is visible. For example, use this method to determine if the Folder List is currently visible in the explorer. Returns True if the specified pane is displayed in the explorer.

Note   You can also use the Visible property of the OutlookBarPane object to determine whether the Outlook Bar is visible.

object.IsPaneVisible(Pane)

object   Required. An expression that returns an Explorer object.

Pane   Required OlPane.

OlPane can be one of these OlPane constants.
olFolderList
olOutlookBar
olPreview

Example

This Microsoft Visual Basic/Visual Basic for Applications sample uses the IsPaneVisible method to determine whether the Outlook Bar is visible and uses the ShowPane method to display it if it is not visible.

Dim myOlApp As New Outlook.Application
Set myOlExp = myOlApp.ActiveExplorer
If myOlExp.IsPaneVisible(olOutlookBar) = False Then
    myolexp.ShowPane olOutlookBar,True
End If

If you use VBScript, you do not create the Application object, and you cannot use named constants. This example shows how to perform the same task using VBScript.

Set myOlExp = Application.ActiveExplorer
If myOlExp.IsPaneVisible(1) = False Then
    myOlExp.ShowPane 1,True
End If