API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.RemoveFromSelection method
Removes a shape from a selection; does not work if the shape is a Selection Shape
Syntax:
Sub RemoveFromSelection()
Remarks:
The RemoveFromSelection method removes a shape from a selection. This method does not work if the shape is a selection shape.
Examples:
The following VBA example removes all text objects from the selection.
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