Orientation Property

Microsoft Publisher Visual Basic

Show All Show All

Orientation Property

ShowOrientation property as it applies to the TextFrame object.

Returns or sets a PbTextOrientation constant that represents how text flows in a text box. Read/write.

PbTextOrientation can be one of these PbTextOrientation constants.
pbTextOrientationHorizontal
pbTextOrientationMixed
pbTextOrientationRightToLeft
pbTextOrientationVerticalEastAsia

expression.Orientation

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

ShowOrientation property as it applies to the PageSetup object.

Returns or sets a PbOrientationType constant that specifies whether the page is in landscape or portrait orientation. Read/write.

PbOrientationType can be one of these PbOrientationType constants.
pbOrientationLandscape
pbOrientationPortrait

expression.Orientation

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

Example

ShowAs it applies to the TextFrame object.

This example sets the text orientation in the specified text box to vertical so that text flows from top to bottom. This assumes there is at least one shape on page one of the active publication.

Sub SetVerticalTextBox()
    ActiveDocument.Pages(1).Shapes(1).TextFrame _
        .Orientation = pbTextOrientationVerticalEastAsia
End Sub
		

ShowAs it applies to the PageSetup object.

The following example sets the orientation of the pages in the active document to landscape.

With ActiveDocument.PageSetup
    .Orientation = pbOrientationLandscape
End With