SetCurrentFormPage Method

Displays the specified form page in the inspector.


*expression   * Required. An expression that returns an Inspector object.

PageName    Required String. The display name of the form page.


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.

Sub ShowAllFieldsPage()
 Dim myOlApp As New Outlook.Application
 Dim myInspector As Inspector
 Dim myItem As Object
 Set myInspector = myOlApp.ActiveInspector
 On Error GoTo ErrorHandler
 myInspector.SetCurrentFormPage ("All Fields")
 Set myItem = myInspector.CurrentItem
 Exit Sub
     MsgBox "No current item to display."
End Sub

Applies to | Inspector Object

See Also | Pages Object