Share via


ViewInfo.Name Property

InfoPath Developer Reference

A read-only property that returns a string value indicating the name of the view that is associated with the ViewInfo object. Read-only

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.Name

expression   An expression that returns a ViewInfo object.

Return Value
String

Remarks

The name of the ViewInfo object is the same as the name of the view that it represents. The name of the ViewInfo object can also be used as the argument to the Item property of the ViewInfos collection.

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 Name property of the ViewInfo object is used to to display the name of a view in a message box:

JScript
  var objViewInfo;

objViewInfo = XDocument.ViewInfos(0); XDocument.UI.Alert("View name: " + objViewInfo.Name);

See Also