IsPaneVisible Method 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