API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.GetSize method
Returns the width and height of a shape
Syntax:
Sub GetSize(ByRef Width As Double, ByRef Height As Double)
Parameters:
Name Type Description
Width
Double
Height
Double
Remarks:
The GetSize method returns the horizontal and vertical size of a shape. See also the Shape.SizeWidth and Shape.SizeHeight properties.
Examples:
The following VBA example returns the width and height of each shape on the active page, and it creates a rectangle with the same dimensions.
Sub Test()
Dim s As Shape
Dim x As Double, y As Double
ActiveDocument.ReferencePoint = cdrBottomLeft
For Each s In ActivePage.Shapes
  s.GetSize x, y
  ActiveLayer.CreateRectangle2 0, 0, x, y
Next s 
End Sub