API Documentation > CorelDRAW > 2025-v26 > Text > IVGText
Text.Selection property
Gets the selected text in the text stream, as a TextRange
Syntax:
Property Get Selection() As TextRange
Remarks:
The Selection property returns the selected text in a text stream as a TextRange object.
Examples:
The following VBA example displays the selected text if the active shape is a text shape.
Sub Test()
If ActiveShape.Type = cdrTextShape Then
  MsgBox ActiveShape.Text.Selection.Text
End If 
End Sub