Skip to main content
A newer version of this page is available. .

Document.Selections Property

Provides access to a collection of selections in the document.

Namespace: DevExpress.XtraRichEdit.API.Native

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

Declaration

SelectionCollection Selections { get; }

Property Value

Type Description
SelectionCollection

A SelectionCollection object containing ranges selected in the document.

Example

document.LoadDocument("SelectionCollection.docx", DocumentFormat.OpenXml)
Dim startPos As Integer = 80
Dim endPos As Integer = document.Tables(0).Rows(1).LastCell.ContentRange.Start.ToInt()
Dim myRange As DocumentRange = document.CreateRange(startPos, endPos - startPos)
document.Selections.Add(myRange)
See Also