ShowFormPage Method

Microsoft Outlook Visual Basic

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 (VBA) 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.

Sub ShowAllFieldsPage()
 Dim myOlApp As New Outlook.Application
 Dim myInspector As Outlook.Inspector
 Dim myItem As Object
 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."
End Sub