Export (0) Print
Expand All

View.SwitchView Method

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

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.SwitchView(bstrName)

expression   An expression that returns a View object.

Parameters

NameRequired/OptionalData TypeDescription
bstrNameRequiredStringThe name of the view to switch to. If an empty string is used, the default view is displayed.

Return Value
Nothing

Remarks

If an empty string is used as the

bstrName parameter, the view is changed to the default view of the form.

Security Level 2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Example

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

JScript
XDocument.View.SwitchView("");



Community Additions

ADD
Show:
© 2015 Microsoft