The Application object is the top-level object that provides access to the lower-level properties and methods contained within the object model.
For example, this dialog box displays the current version of the application:
XDocument.UI.Alert("the version of this application is: " + Application.Version)
Note | The XDocument property does not require a fully qualified path to the Application object. Both the Application and XDocument objects are embedded directly into the InfoPath script engine. They both do need to be declared when used as part of an expression or argument within a statement. |