編輯

共用方式為


VersionUpgradeEventObject Interface

Definition

An event object that is used during a Microsoft Office InfoPath 2003 version upgrade event.

public interface class VersionUpgradeEventObject : Microsoft::Office::Interop::InfoPath::VersionUpgradeEvent
[System.Runtime.InteropServices.Guid("096CD614-0786-11D1-95FA-0080C78EE3BB")]
public interface VersionUpgradeEventObject : Microsoft.Office.Interop.InfoPath.VersionUpgradeEvent
type VersionUpgradeEventObject = interface
    interface VersionUpgradeEvent
Public Interface VersionUpgradeEventObject
Implements VersionUpgradeEvent
Derived
Attributes
Implements

Examples

In the following example, the DocumentVersion and SolutionVersion properties of the VersionUpgradeEvent object are used to display the version numbers of the form and form template:

public void OnVersionUpgrade(<span class="label">VersionUpgradeEvent</span> e)
{
 thisXDocument.UI.Alert("The form version: " + e.DocumentVersion + 
  "\nThe form template version: " + e.SolutionVersion);
 e.ReturnStatus = true;   
}

Remarks

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeVersionUpgradeEvent.

The VersionUpgradeEvent object provides a number of properties that can be used within a version upgrade event to programmatically interact with a form's underlying XML document, determine the version numbers of the form and form template, and provide a response indicating the success of the version upgrade process.

The VersionUpgradeEvent object is passed as a parameter to OnVersionUpgrade of an InfoPath form. The properties that it provides are available only during this event.

Properties

DocumentVersion

Gets the version number of a Microsoft Office InfoPath form.

(Inherited from VersionUpgradeEvent)
ReturnStatus

Gets or sets the return status of the OnVersionUpgrade event.

(Inherited from VersionUpgradeEvent)
SolutionVersion

Gets the version number of a Microsoft Office InfoPath form template.

(Inherited from VersionUpgradeEvent)
XDocument

Gets a reference to the XDocument object associated with VersionUpgradeEventObject object during an OnVersionUpgrade event.

(Inherited from VersionUpgradeEvent)

Applies to