API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.GetBoundingBox method
Returns the shape bounding box relative to its lower-left corner
Syntax:
Sub GetBoundingBox(ByRef x As Double, ByRef y As Double, ByRef Width As Double, ByRef Height As Double, Optional ByVal UseOutline As Boolean = False)
Parameters:
Name Type Description
x
Double
y
Double
Width
Double
Height
Double
UseOutline
Boolean
Specifies whether the outline is included in any measurements.
Remarks:
The GetBoundingBox method returns the size of a shape and the position of its lower-left corner. If the UseOutline parameter is set to True, then the outline width and shape are accounted for when calculating the bounding-box dimensions. Otherwise, the shape is treated as if it has no outline.
Examples:
The following VBA example creates a rectangle around each shape on the active page.
Sub Test()
Dim s As Shape
Dim x As Double, y As Double, w As Double, h As Double
ActiveDocument.ReferencePoint = cdrBottomLeft
For Each s In ActivePage.Shapes
  s.GetBoundingBox x, y, w, h
  ActiveLayer.CreateRectangle2 x, y, s.SizeWidth, s.SizeHeight
Next s 
End Sub