Share via


Inspector.SetCurrentFormPage Method

Outlook Developer Reference

Displays the specified form page in the inspector.

Syntax

expression.SetCurrentFormPage(PageName)

expression   A variable that represents an Inspector object.

Parameters

Name Required/Optional Data Type Description
PageName Required String The display name of the form page.

Example

This Visual Basic for Applications (VBA) example uses the SetCurrentFormPage method to show the All Fields page of the currently open item. If no items are currently open, a message box will inform the user.

Visual Basic for Applications
  Sub ShowAllFieldsPage()
    Dim myInspector As Inspector
    Dim myItem As Object
Set myInspector = Application.ActiveInspector
On Error GoTo ErrorHandler
myInspector.<strong class="bterm">SetCurrentFormPage</strong> ("All Fields")
Set myItem = myInspector.CurrentItem
myItem.Display

Exit Sub

ErrorHandler: MsgBox "No current item to display." End Sub

See Also