VersionUpgradeEvent.DocumentVersion Property

InfoPath Developer Reference

A read-only property that returns a string containing the version number of a Microsoft Office InfoPath 2007 form. Read-only

Version Information
 Version Added:  InfoPath 2003

Syntax

expression.DocumentVersion

expression   An expression that returns a VersionUpgradeEvent object.

Return Value
String

Remarks

This property can be used only during the OnVersionUpgrade event.

Security Level 2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

Example

In the following example, the DocumentVersion property of the VersionUpgradeEvent object is used to display the version number of an InfoPath form in a message box:

JScript
  function XDocument::OnVersionUpgrade(eventObj)
{
   XDocument.UI.Alert("The form version: " + eventObj.DocumentVersion +
      "\nThe form template version: " + eventObj.SolutionVersion);
   eventObj.ReturnStatus = true;
}

See Also