API Documentation > CorelDRAW > 2025-v26 > Document > IVGDocument
Document.SelectionRange property
Returns a collection of shapes within the selection
Syntax:
Property Get SelectionRange() As ShapeRange
Remarks:
The SelectionRange property represents the selected objects in the document and returns them as a shape range (or ShapeRange) object.
Examples:
The following VBA example removes all text objects from the selection range.
Sub Test()
Dim sr As ShapeRange
Dim s As Shape
Set sr = ActiveDocument.SelectionRange
For Each s In sr
  If s.Type = cdrTextShape Then s.RemoveFromSelection
  Next s

End Sub