officefileapi-devexpress-dot-xtrarichedit-dot-richeditdocumentserver-dot-createnewdocument-x28-system-dot-boolean-x29.md
Creates a new blank document.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
public virtual bool CreateNewDocument(
bool raiseDocumentClosing = false
)
Public Overridable Function CreateNewDocument(
raiseDocumentClosing As Boolean = False
) As Boolean
| Name | Type | Default | Description |
|---|---|---|---|
| raiseDocumentClosing | Boolean | False |
true to raise the RichEditDocumentServer.DocumentClosing event before creating a new document; otherwise false.
|
| Type | Description |
|---|---|
| Boolean |
true to create a new document; otherwise false.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the CreateNewDocument(Boolean) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
word-document-api-examples/CS/CodeExamples/BasicActions.cs#L20
// Create a new blank document.
wordProcessor.CreateNewDocument();
#endregion #CreateDocument
winforms-richedit-layout-api/CS/Form1.cs#L101
RichEditDocumentServer srv = new RichEditDocumentServer();
srv.CreateNewDocument();
srv.Document.AppendDocumentContent(richEditControl1.Document.Selection);
word-document-api-examples/VB/CodeExamples/BasicActions.vb#L24
' Create a new blank document.
wordProcessor.CreateNewDocument()
#End Region ' #CreateDocument
winforms-richedit-layout-api/VB/Form1.vb#L83
Dim srv As New RichEditDocumentServer()
srv.CreateNewDocument()
srv.Document.AppendDocumentContent(richEditControl1.Document.Selection)
See Also