officefileapi-devexpress-dot-xtrarichedit-dot-richeditdocumentserver-dbe8a053.md
Provides access to a Document interface, representing the document contained in the server.
Namespace : DevExpress.XtraRichEdit
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
[Browsable(false)]
public Document Document { get; }
<Browsable(False)>
Public ReadOnly Property Document As Document
| Type | Description |
|---|---|
| Document |
A Document interface that provides access to a loaded document.
|
The Document property is the main access point to RichEdit API.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Document property.
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/HeaderAndFooterActions.cs#L16
// Access a document.
Document document = wordProcessor.Document;
word-document-api-table-examples/CS/Program.cs#L15
{
CreateTable(wordProcessor.Document);
SetColumnWidth(wordProcessor.Document.Tables[0]);
word-processing-table-of-contents-practical-guide/CS/Program.cs#L40
wordProcessor.LoadDocument("Employees.rtf");
Document document = wordProcessor.Document;
document.BeginUpdate();
word-document-api-insert-dynamic-content/CS/Program.cs#L20
wordProcessor.LoadDocument("Dynamic Content.docx");
InsertDocVariableField(wordProcessor.Document);
wordProcessor.CalculateDocumentVariable += WordProcessor_CalculateDocumentVariable;
word-processing-merge-documents-with-different-headers-and-footers/CS/Helpers/DocumentsMerger.cs#L11
RichEditDocumentServer sourceServer = new RichEditDocumentServer();
Document targetDoc = targetServer.Document;
Document sourceDoc = sourceServer.Document;
word-document-api-examples/VB/CodeExamples/HeaderAndFooterActions.vb#L16
' Access a document.
Dim document As DevExpress.XtraRichEdit.API.Native.Document = wordProcessor.Document
' Access the first document section.
word-document-api-table-examples/VB/Program.vb#L12
Using wordProcessor As RichEditDocumentServer = New RichEditDocumentServer()
CreateTable(wordProcessor.Document)
SetColumnWidth(wordProcessor.Document.Tables(0))
word-processing-table-of-contents-practical-guide/VB/Program.vb#L36
wordProcessor.LoadDocument("Employees.rtf")
Dim document As Document = wordProcessor.Document
document.BeginUpdate()
word-document-api-insert-dynamic-content/VB/Module1.vb#L15
wordProcessor.LoadDocument("Dynamic Content.docx")
InsertDocVariableField(wordProcessor.Document)
AddHandler wordProcessor.CalculateDocumentVariable, AddressOf WordProcessor_CalculateDocumentVariable
word-processing-merge-documents-with-different-headers-and-footers/VB/Helpers/DocumentsMerger.vb#L9
Dim sourceServer As New RichEditDocumentServer()
Dim targetDoc As Document = targetServer.Document
Dim sourceDoc As Document = sourceServer.Document
See Also