XmlForms Property
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Application.XmlForms Property (Microsoft.Office.InfoPath)

Gets a reference to the XmlFormCollection.

Namespace: Microsoft.Office.InfoPath
Assembly: Microsoft.Office.InfoPath (in microsoft.office.infopath.dll)

public abstract XmlFormCollection XmlForms { get; }

Property Value

An XmlFormCollection that represents the collection of forms that are currently open.

After you have set a reference to the XmlFormcollection type, you can use its properties to access each of the XmlForm objects that it contains.

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.

In the following example, the XmlForms property is used to access the Count property of the XmlFormCollection and display the value in a message box.

int formsCount = this.Application.XmlForms.Count;
© 2015 Microsoft