VerticalTextAlignment Property

Microsoft Publisher Visual Basic

constant that represents the vertical alignment of text in a text box. Read/write.

PbVerticalTextAlignmentType can be one of these PbVerticalTextAlignmentType constants.
pbVerticalTextAlignmentBottom
pbVerticalTextAlignmentCenter
pbVerticalTextAlignmentTop

expression.VerticalTextAlignment

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

Example

This example vertically centers the text in the specified text frame. This example assumes there is at least one shape on the first page of the active publication.

Sub SetVerticalAlignment()
    ActiveDocument.Pages(1).Shapes(1).TextFrame _
        .VerticalTextAlignment = pbVerticalTextAlignmentCenter
End Sub