ViewInfo2.Name property
Gets the name of the view that is associated with the ViewInfoObject object.
Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)
Syntax
'Declaration
ReadOnly Property Name As String
Get
'Usage
Dim instance As ViewInfo2
Dim value As String
value = instance.Name
string Name { get; }
Property value
Type: System.String
Implements
Remarks
The name of the ViewInfoObject object is the same as the name of the view that it represents. The name of the ViewInfoObject object can also be used as the argument to the Item property of the ViewInfosCollection collection.
Examples
In the following example, the Name property of the ViewInfoObject object is used to display the name of a view in a message box:
ViewInfo viewInfo;
viewInfo = thisXDocument.ViewInfos[0];
thisXDocument.UI.Alert("View name: " + viewInfo.Name);