XmlFormCollection.Item Property
Gets a reference to the specified XmlForm object from the collection by index value.
Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)
Syntax
'Declaration
'Usage
Parameters
- index
The zero-based index of the form to return.
Property Value
The XmlForm object for the specified index value.
Exceptions
Exception type | Condition |
---|---|
The index provided is out of range. |
Remarks
If the value provided for the index parameter does not match any existing member of the collection, an exception is raised.
After you have set a reference to the XmlForm object that the Item property returns, you can access any of its properties or methods.
This member can be accessed without restrictions.
This type or member can be accessed only from code running in forms opened in Microsoft Office InfoPath 2007.
Example
Because the Item property is the default property of the XmlFormCollection class, it can be used as shown in the following example.
XmlForm firstForm = this.Application.XmlForms[0];
Dim firstForm As XmlForm = Me.Application.XmlForms(0)
See Also
Reference
XmlFormCollection Class
XmlFormCollection Members
Microsoft.Office.InfoPath Namespace