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. To vertically align the content of a cell in a table.
For example, it could be used to vertically position an image in a line of text.
TextFrame.HorizontalAnchor = msoAnchorCenter The vertical-align property can be used in two contexts: To vertically align an inline element’s box inside its containing line box. In the Vertical alignment box, click Center. On the Layout or Page Layout tab, click the Dialog Box Launcher in the Page Setup group, and then click the Layout tab. Center the text vertically between the top and bottom margins. Set myDocument = ActivePresentation.SlideMaster In the Vertical alignment box, click Center. This example sets the alignment of the text in shape one on myDocument to top centered. Returned when two or more text boxes within a shape range have this property set to different values. When you resize text without baseline anchoring, the text centers itself on the previous position. When you resize text without baseline anchoring, the text centers itself on the previous position.Īnchors the middle of the text string to the current position.Īnchors the top of the text string to the current positionĪnchors the top of the text string to the current position regardless of the resizing of text. ConstantĪnchors the bottom of the text string to the current position.Īnchors the bottom of the text string to the current position regardless of the resizing of text. The value of the VerticalAnchor property can be one of these MsoVerticalAnchor constants. Class Libraries & REST APIs for the developers to manipulate & process Files from Word, Excel, PowerPoint, Visio, PDF, CAD & several other categories in Web, Desktop or Mobile apps. SyntaxĮxpression A variable that represents a TextFrame object. The box that says, 'Same as the whole table' should be clicked. You will see the default cell margins (which you can change if you want to). Returns or sets the vertical alignment of text in a text frame. Then find the tab at the top called Table Tools - Layout.