This documentation is archived and is not being maintained.

DocReturnEvent.ReturnStatus Property (Microsoft.Office.Interop.InfoPath)

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)

bool ReturnStatus { get; set; }

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.

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;
}
Show: