Sets the horizontal alignment type of text with respect to its text box for the specified paragraph of the shape.
Applies to: Shape object
object.SetParaHAlign ( iFrom, iTo, HAlign ) |
The SetParaHAlign method syntax has these parts:
Part | Description |
object | Required. An expression that returns a Shape object. |
iFrom | Required. An expression that returns a Long value. The index of the first character of the paragraph. |
iTo | Required. An expression that returns a Long value. The index of the last character of the paragraph. |
HAlign | Required. An expression that returns a Single value. The horizontal alignment type. |
Note, that if the paragraph collection of the shape doesn't contain the paragraph that corresponds to the character sequence within the iFrom to iTo range, the SetParaHAlign method adds a new paragraph and applies the specified horizontal alignment type to it.
The HAlign parameter can take the following values:
Constant | Value | Description |
cdHorizLeft | 0 | Align to the left edge. |
cdHorizCenter | 1 | Align to the center. |
cdHorizRight | 2 | Align to the right edge. |