A Byte type property. Specifies horizontal alignment of the paragraph's text with respect to the text block's alignment box.
Applies to: Paragraph object
[Let] byteRet = object.HAlign [Let] object.HAlign = hAlignSet |
The HAlign property syntax has these parts:
Part | Description |
object | Required. An expression that returns a Paragraph object. |
byteRet | Optional. A Byte type variable. |
hAlignSet | Required. An expression that returns a Byte value. |
There are the following types of horizontal alignment:
Constant | Value | Description |
cdHorizLeft | 0 | Alignment to the left edge. |
cdHorizCenter | 1 | Alignment to the center. |
cdHorizRight | 2 | Alignment to the right edge. |
The HAlign property is also a table parameter of the shape, which contains the object paragraph, that is, its value can be described by a formula. To work with HAlign as a table parameter, use the CDPT_PARA_HALIGN constant tag.
This example demonstrates how to align the first paragraph of the shape's text to the right. It assumes a shape that contains text exists in the document.
Dim s as Shape |
See Also |
SetParaHAlign method |