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
'Usage
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).
Example
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