RichEditControl.SaveDocument() Method
Saves a document in its original format to its original location.
Namespace: DevExpress.XtraRichEdit
Assembly: DevExpress.XtraRichEdit.v24.1.dll
NuGet Packages: DevExpress.Win.PivotGrid, DevExpress.Win.RichEdit, DevExpress.Win.TreeMap
Declaration
Returns
Type | Description |
---|---|
Boolean | true if a document has been successfully saved; otherwise, false. |
Remarks
Use the SaveDocument method to save changes while editing the document.
The original format is determined by the DocumentSaveOptions.CurrentFormat property. The original location is determined by the DocumentSaveOptions.CurrentFileName property. For the newly created document or a document loaded from a stream, the RichEditControl.SaveDocumentAs method is called.
Consider the situation when a document is being saved to a locked or read-only file. To prevent application failure, subscribe to the RichEditControl.UnhandledException event and set the RichEditUnhandledExceptionEventArgs.Handled property to true.
Note
The SaveDocument method call does not automatically change the RichEditControl.Modified property value.