TextFrame.HorizontalAnchor Property (Word)
Returns or sets the horizontal alignment of text in a text frame. Read/write MsoHorizontalAnchorMsoHorizontalAnchor.
Version Information
Version Added: Word 2010
Syntax
expression .HorizontalAnchor
expression A variable that represents a TextFrame object.
Example
The following code example shows how to set the alignment for the first shape in the active document to top center.
Public Sub HorizontalAnchor_Example()
With ActiveDocument.Shapes(1)
.TextFrame.HorizontalAnchor = msoAnchorCenter
.TextFrame.VerticalAnchor = msoAnchorTop
End With
End Sub