Share via


XDocuments.Count Property

InfoPath Developer Reference

A read-only property that returns a count of the number of XDocument objects contained in the XDocuments collection. Read-only

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.Count

expression   An expression that returns a XDocuments object.

Return Value
Long

Remarks

The Count property returns a long integer value.

Security Level 0: Can be accessed without restrictions.

Example

In the following example, the Count property of the XDocuments collection is used within a JScript 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:

JScript
  for (i=0; i < Application.XDocuments.Count; i++)
{
   XDocument.UI.Alert("XDocument URI: " + Application.XDocuments(i).URI);
}

See Also