Skip to main content

SubDocument.CreatePosition(Int32) Method

Creates a new position in the current document.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v23.2.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation


DocumentPosition CreatePosition(
    int start


Name Type Description
start Int32

An integer value specifying the start position.


Type Description

A DocumentPosition object representing the position in the current document.


The following code sample calls the SubDocument.CreatePosition method to obtain the document position at the given index and inserts a text in it:


using (var wordProcessor = new RichEditDocumentServer())
    Document document = wordProcessor.Document;
    DocumentPosition pos1 = document.CreatePosition(2);
    document.InsertText(pos1,"The Word Processing Document API is a non-visual .NET library.\r
    It allows you to automate frequent word processing tasks.\n");

The following code snippets (auto-collected from DevExpress Examples) contain references to the CreatePosition(Int32) method.


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.

See Also