[]
Specifies the horizontal alignment for text within the text frame of a shape.
Use this enum with TextAlignment to control how text is aligned inside a shape's text range.
public enum TextAlignmentAnchor
Public Enum TextAlignmentAnchor
IShape shape = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, worksheet.Range["B1:D3"]);
ITextRange textRange = shape.TextFrame.TextRange;
textRange.Add("Sales Report");
textRange.TextAlignment = TextAlignmentAnchor.Center;
| Name | Description |
|---|---|
| Center | Center text alignment. |
| Distribute | Distribute text alignment. |
| Justify | Justify text alignment. |
| Left | Left text alignment. |
| Mixed | Mixed text alignment. |
| Right | Right text alignment. |