API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.AddToSelection method
Adds a shape to a selection; does not work if the shape is a Selection Shape
Syntax:
Sub AddToSelection()
Remarks:
The AddToSelection method adds a shape to a selection. This method does not work with selection shapes.
Examples:
The following VBA example selects all ellipses and rectangles on the active page.
Sub Test()
ActivePage.FindShapes(Type:=cdrEllipseShape).CreateSelection
ActivePage.FindShapes(Type:=cdrRectangleShape).AddToSelection 
End Sub