Back to Devexpress

RichEditDocumentServer.Document Property

officefileapi-devexpress-dot-xtrarichedit-dot-richeditdocumentserver-dbe8a053.md

latest5.8 KB
Original Source

RichEditDocumentServer.Document Property

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

Declaration

csharp
[Browsable(false)]
public Document Document { get; }
vb
<Browsable(False)>
Public ReadOnly Property Document As Document

Property Value

TypeDescription
Document

A Document interface that provides access to a loaded document.

|

Remarks

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

csharp
// Access a document.
Document document = wordProcessor.Document;

word-document-api-table-examples/CS/Program.cs#L15

csharp
{
    CreateTable(wordProcessor.Document);
    SetColumnWidth(wordProcessor.Document.Tables[0]);

word-processing-table-of-contents-practical-guide/CS/Program.cs#L40

csharp
wordProcessor.LoadDocument("Employees.rtf");
Document document = wordProcessor.Document;
document.BeginUpdate();

word-document-api-insert-dynamic-content/CS/Program.cs#L20

csharp
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

csharp
RichEditDocumentServer sourceServer = new RichEditDocumentServer();
Document targetDoc = targetServer.Document;
Document sourceDoc = sourceServer.Document;

word-document-api-examples/VB/CodeExamples/HeaderAndFooterActions.vb#L16

vb
' 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

vb
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

vb
wordProcessor.LoadDocument("Employees.rtf")
Dim document As Document = wordProcessor.Document
document.BeginUpdate()

word-document-api-insert-dynamic-content/VB/Module1.vb#L15

vb
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

vb
Dim sourceServer As New RichEditDocumentServer()
Dim targetDoc As Document = targetServer.Document
Dim sourceDoc As Document = sourceServer.Document

Implements

Document

See Also

RichEditDocumentServer Class

RichEditDocumentServer Members

DevExpress.XtraRichEdit Namespace