ChangeOrientation Method

Microsoft Publisher Visual Basic

Show All Show All

ChangeOrientation Method

Sets a PbNavBarOrientation constant that represents the alignment of the navigation bar; vertical or horizontal.

ChangeOrientation can be set to one of these PbNavBarOrientation constants:
pbNavBarOrientHorizontal
pbNavBarOrientVertical

expression.ChangeOrientation

expression    Required. An expression that returns a WebNavigationBarSet object.

Example

The following example sets an object variable to the first Web navigation bar set in the active document, adds it every page, changes the orientation to horizontal, sets the horizontal alignment to center, and then sets the horizontal button count to 4.

    Dim objWebNav As WebNavigationBarSet
Set objWebNav = ActiveDocument.WebNavigationBarSets(1)
With objWebNav
    .AddToEveryPage Left:=10, Top:=10
    .ChangeOrientation pbNavBarOrientHorizontal
    .HorizontalAlignment = pbnbAlignCenter
    .HorizontalButtonCount = 4
End With