API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.Duplicate method
Duplicates the entire Shape range
Syntax:
Function Duplicate(Optional ByVal OffsetX As Double = 0, Optional ByVal OffsetY As Double = 0) As ShapeRange
Parameters:
Name Type Description
OffsetX
Double
Specifies the horizontal distance to offset the duplicated shape range.
OffsetY
Double
Specifies the vertical distance to offset the duplicated shape range.
Remarks:
The Duplicate method duplicates each shape in a shape range, returning another shape range that contains all the duplicates.
Examples:
The following VBA example duplicates each curve shape, removes any fills in the range, assigns a thick outline to each duplicate, and groups all the duplicated curves.
Sub Test()
Dim sr As ShapeRange
Set sr = ActiveLayer.FindShapes(, cdrCurveShape)
Set sr = sr.Duplicate
sr.ApplyNoFill
sr.SetOutlineProperties 0.1
sr.Group 
End Sub