API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.SetSize method
Stretches a shape to fit a specific width and height
Syntax:
Sub SetSize(Optional ByVal Width As Double = 0, Optional ByVal Height As Double = 0)
Parameters:
Name Type Description
Width
Double
Specifies, in document units, the width of the shape.
Height
Double
Specifies, in document units, the height of the shape.
Remarks:
The SetSize method stretches a shape to fit a specified width and height. The shape is stretched relative to the reference point specified by the Document.ReferencePoint property. If either parameter is omitted, the other parameter is calculated based on the other dimension to maintain proportions. You cannot omit both parameters, however. See also the Shape.SetBoundingBox method, as well as the Shape.SizeWidth and Shape.SizeHeight properties.
Examples:
The following VBA example resizes all shapes on the active page.
Sub Test()
Dim s As Shape
ActiveDocument.ReferencePoint = cdrBottomLeft
For Each s In ActivePage.Shapes
  s.SetSize 1, 1
Next s 
End Sub