VerticalAnchor Property

Microsoft PowerPoint Visual Basic

VerticalAnchor Property

       

Returns or sets the vertical alignment of text in a text frame. Read/write MsoVerticalAnchor.

MsoVerticalAnchor can be one of these MsoVerticalAnchor constants.
msoAnchorBottom
msoAnchorBottomBaseLine Anchors the bottom of the text string to the current position regardless of the resizing of text. When you resize text without baseline anchoring, the text centers itself on the previous position.
msoAnchorMiddle
msoAnchorTop
msoAnchorTopBaseline Anchors the bottom of the text string to the current position regardless of the resizing of text. When you resize text without baseline anchoring, the text centers itself on the previous position.
msoVerticalAnchorMixed Read-only. Returned when two or more text boxes within a shape range have this property set to different values.

expression.VerticalAnchor

expression   Required. An expression that returns one of the objects in the Applies To list.

Example

This example sets the alignment of the text in shape one on myDocument to top centered.

Set myDocument = ActivePresentation.SlideMaster
With myDocument.Shapes(1)
    .TextFrame.HorizontalAnchor = msoAnchorCenter
    .TextFrame.VerticalAnchor = msoAnchorTop
End With