Sub Kramank()
ActiveDocument.BeginCommandGroup "Kramank"
ActiveDocument.Unit = cdrCentimeter

If ActiveShape.Text.IsArtisticText = True Then
    Exit Sub
End If

Dim Val As String
    Val = InputBox("Width?", "Paragraph Width")
        If StrPtr(Val) = False Then Exit Sub

ActiveShape.SetSize Val - 0.1
ActiveShape.Text.Story.Alignment = cdrFullJustifyAlignment
ActiveShape.Text.Story.Tabs.Add Val - 0.1, cdrTextTabRight
ActiveShape.Text.Story.ParaSpacingBefore = 87
ActiveShape.AlignToPage cdrAlignHCenter

End Sub
Here, Alignment to horizontal center of page not working. what wrong here ? please help