API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.AlignToGrid method
Aligns all shapes of the range to the grid
Syntax:
Sub AlignToGrid(ByVal Type As cdrAlignType, Optional ByVal TextAlignOrigin As cdrTextAlignOrigin = cdrTextAlignBoundingBox)
Parameters:
Name Type Description
Type
TextAlignOrigin
Specifies the origin for text alignment.
Remarks:
The AlignToGrid method aligns all the shapes in a shape range to the grid.