API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.ConvertOutlineToObject method
Converts an outline into an object
Syntax:
Function ConvertOutlineToObject() As ShapeRange
Remarks:
The ConvertOutlineToObject method converts the outline of each shape in a shape range to a separate fillable object.
Examples:
The following VBA example converts the outline of each curve to a closed curve shape.
Sub Test()
Dim sr As ShapeRange
Dim n As Long
Set sr = ActivePage.FindShapes(Type:=cdrCurveShape)
For n = sr.Count To 1 Step -1
  If sr(n).Outline.Type = cdrNoOutline Then sr.Remove n
  Next n
  sr.ConvertOutlineToObject

End Sub