API Documentation > CorelDRAW > 2025-v26 > StructAlignProperties > IVGStructAlignProperties
StructAlignProperties.Alignment property
Syntax:
Property Get Alignment() As cdrAlignment
Property Let Alignment(ByVal Value As cdrAlignment)
Remarks:
The Alignment property returns or specifies the alignment (that is, justification) of a text object. The Alignment property returns a value of cdrAlignment.
Examples:
The following VBA example creates a text object in the center of the page.
Sub Test()
Dim s As Shape
Dim x As Double, y As Double
x = ActivePage.SizeWidth / 2
y = ActivePage.SizeHeight / 2
Set s = ActiveLayer.CreateArtisticText(x, y, "A Text String" & vbCr & _
  "With Two Lines")
s.Text.AlignProperties.Alignment = cdrCenterAlignment 
End Sub