IsSaveAs Property

Microsoft Office InfoPath

A read-only property that returns a Boolean value that indicates whether the PerformSaveOperation method of the SaveEvent object will be performed as a "save" operation or as a "save as" operation.

expression.IsSaveAs

expression    Required. An expression that returns a reference to a SaveEvent object.

Security Level

2: 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.

Remarks

The IsSaveAs property returns true when the event was triggered by a call to the SaveAs method, or by a call to the Save method when the document is new, or by a call to either method when the document is read-only. Otherwise, the IsSaveAs property returns False.

Note  This object model member is not supported when the Disable Service Pack features option on the Advanced tab of the Options dialog box in InfoPath is selected or when Microsoft Office 2003 Service Pack 1 or later is not installed. Any form that implements this object model member in its code will generate an error message if it is opened in InfoPath when service pack features are disabled or unavailable.

Example

In the following example, the IsSaveAs property of the SaveEvent object is used to determine if the user will be presented with a Save As dialog box; otherwise, it will inform the user that the form will simply be saved.

        if (!eventObj.IsSaveAs)
{
    XDocument.UI.Alert(“About to save this form.”);
}
eventObj.PerformSaveOperation();