Share via


DocReturnEvent.ReturnStatus property

Gets or sets a value indicating the return status of the OnLoad event and the OnSubmitRequest event.

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

Syntax

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

value = instance.ReturnStatus

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

Property value

Type: System.Boolean

Remarks

If the ReturnStatus property is set to false, the OnLoad and OnSubmitRequest events fail. If set to true, the OnLoad and OnSubmitRequest events are successful. The default value for the OnLoad event is true, and the default value for the OnSubmitRequest event is false.

Examples

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

public void OnLoad(DocReturnEvent e)
{ 
 // Cancel the event.
 e.ReturnStatus = false;
}

See also

Reference

DocReturnEvent interface

DocReturnEvent members

Microsoft.Office.Interop.InfoPath namespace