Share via


View2.SwitchView Method

Changes the active view of a Microsoft Office InfoPath 2007 form to a specified view.

Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)

Syntax

'Declaration
'Usage

Parameters

  • bstrName
    The name of the view to switch to. If an empty string is used, the default view is displayed.

Remarks

If an empty string is used as the bstrName parameter, the view is changed to the default view of the form.

Example

In the following example, the SwitchView method of the ViewObject object is used to change the current view to the default view:

thisXDocument.View.SwitchView("");

See Also

Reference

View2 Interface
View2 Members
Microsoft.Office.Interop.InfoPath Namespace