ShowFormPage Method

Microsoft Outlook Visual Basic

Show All

ShowFormPage Method

       

Shows a form page in the inspector.

expression.ShowFormPage(PageName)

expression   Required. An expression that returns an Inspector object.

PageName   Required String. The display name of the page to be shown.

Example

This Visual Basic for Applications example uses the ShowFormPage method to show the All Fields page of the currently open item. If there is no currently open item, a message box will inform the user.

Set myOlApp = CreateObject("Outlook.Application")
Set myInspector = myOlApp.ActiveInspector
On Error GoTo ErrorHandler
myInspector.ShowFormPage("All Fields")
Set myItem = myInspector.CurrentItem
myItem.Display
Exit Sub
ErrorHandler:
    MsgBox "No current item to display!"