Share via


VersionUpgradeEvent.ReturnStatus property

Gets or sets the return status of the OnVersionUpgrade event.

Namespace:  Microsoft.Office.Interop.InfoPath.SemiTrust
Assembly:  Microsoft.Office.Interop.InfoPath.SemiTrust (in Microsoft.Office.Interop.InfoPath.SemiTrust.dll)

Syntax

'Declaration
Property ReturnStatus As Boolean
    Get
    Set
'Usage
Dim instance As VersionUpgradeEvent
Dim value As Boolean

value = instance.ReturnStatus

instance.ReturnStatus = value
bool ReturnStatus { get; set; }

Property value

Type: System.Boolean

Implements

DocReturnEvent.ReturnStatus

Remarks

If the ReturnStatus property is set to false, the OnVersionUpgrade event fails and the form is not opened. If set to true, the OnVersionUpgrade event is successful.

Important

This member 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.

Examples

In the following example, the ReturnStatus property of the VersionUpgradeEventObject object is used to indicate that the OnVersionUpgrade event was not successful:

[InfoPathEventHandler(EventType=InfoPathEventType.OnVersionUpgrade)]
public void OnVersionUpgrade(VersionUpgradeEvent e)
{
 e.ReturnStatus = false;   
}

See also

Reference

VersionUpgradeEvent interface

VersionUpgradeEvent members

ReturnStatus overload

Microsoft.Office.Interop.InfoPath.SemiTrust namespace