How to: Create a New Document with the RichEdit Control
The RichEditControl.CreateNewDocument method is used to create a new document in the RichEditControl. The CreateEmptyDocumentCommand command associated with the CTRL-N key combination is also used for this purpose.
The RichEditControl.EmptyDocumentCreated event is raised after a new document is created.
A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E1398.
You can set the RichEditControl.Text property to an empty string to clear the control's content.
You can also use the RichEditControl.LoadDocumentTemplate method to load a document and leave the DocumentSaveOptions.CurrentFileName and the DocumentSaveOptions.CurrentFormat intact. Thus, the document will not be automatically overwritten if the SaveDocumentCommand command is executed or the RichEditControl.SaveDocument is called. An attempt to save a document that was loaded as a template invokes the Save As... dialog, which enables the end-user to specify a different file name and format.