Share via


XDocuments2.Count Property

Gets a count of the number of XDocument objects contained in the collection.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Property Count As Integer
    Get
'Usage
Dim instance As XDocuments2
Dim value As Integer

value = instance.Count
int Count { get; }

Property Value

Type: System.Int32

Implements

XDocuments.Count

Examples

In the following example, the Count property of the XDocuments collection is used within a for loop to iterate through the collection of XDocument objects and display a message box indicating the Uniform Resource Identifier (URI) location for each currently open form:

for (int i=0; i < thisApplication.XDocuments.Count; i++)
{
   thisXDocument.UI.Alert("XDocument URI: " + thisApplication.XDocuments[i].URI);
}

See Also

Reference

XDocuments2 Interface

XDocuments2 Members

Count Overload

Microsoft.Office.Interop.InfoPath Namespace