Muokkaa

Jaa


TextFrame.VerticalAnchor property (PowerPoint)

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

Syntax

expression.VerticalAnchor

expression A variable that represents a TextFrame object.

Return value

MsoVerticalAnchor

Remarks

The value of the VerticalAnchor property can be one of these MsoVerticalAnchor constants.

Constant Description
msoAnchorBottom Anchors the bottom of the text string to the current position.
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 Anchors the middle of the text string to the current position.
msoAnchorTop Anchors the top of the text string to the current position
msoAnchorTopBaseline Anchors the top 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.

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

See also

TextFrame Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.