Share via


SaveEvent.IsCancelled Property

Gets or sets a value that provides additional information for use in OnSaveRequest event in conjunction with the ReturnStatus property.

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

Syntax

'Declaration
Property IsCancelled As Boolean
    Get
    Set
'Usage
Dim instance As SaveEvent
Dim value As Boolean

value = instance.IsCancelled

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

Property Value

Type: System.Boolean

Remarks

When closing InfoPath, the user is prompted to save the document if the IsDirty property is true. If the IsCancelled property is true, InfoPath will be prevented from closing if the save operation fails (that is, the ReturnStatus property is false).

Examples

In the following example, the IsCancelled property of the SaveEventObject object is used to ensure that the document does not close if the save operation was cancelled:

e.IsCancelled = e.PerformSaveOperation();
if(e.IsCancelled)
    return;
e.ReturnStatus = true;

See Also

Reference

SaveEvent Interface

SaveEvent Members

Microsoft.Office.Interop.InfoPath Namespace