InfoPath: Accessing template file data
The XMLForm class of the InfoPath managed code objects model provides properties, methods and events to access the XML data in the underlying XML document and form information that includes the form definition file (.xsf). For example, using the following code we can create a message box that displays some of the data that is available through the Template class, such as the Uniform Resource Identifier (URI), the cache identifier and version number.
Within an InfoPath form place the following code in a button
When the form is run and the button is selected