Returns or sets the orientation of the page. Read/write WdOrientation.
WdOrientation can be one of these WdOrientation constants. |
wdOrientLandscape |
wdOrientPortrait |
expression.Orientation
expression Required. An expression that returns a PageSetup object.
Orientation property as it applies to the Range and Selection objects.
Returns or sets the orientation of text in a range or selection when the Text Direction feature is enabled. Read/write WdTextOrientation.
WdTextOrientation can be one of these WdTextOrientation constants. |
wdTextOrientationDownward |
wdTextOrientationHorizontal |
wdTextOrientationHorizontalRotatedFarEast |
wdTextOrientationUpward |
wdTextOrientationVerticalFarEast |
expression.Orientation
expression Required. An expression that returns one of the above objects.
Orientation property as it applies to the TextFrame object.
Returns or sets the orientation of the text inside the frame. Read/write MsoTextOrientation.
MsoTextOrientation can be one of these MsoTextOrientation constants. |
msoTextOrientationDownward |
msoTextOrientationHorizontal |
msoTextOrientationHorizontalRotatedFarEast |
msoTextOrientationMixed |
msoTextOrientationUpward |
msoTextOrientationVertical |
msoTextOrientationVerticalFarEast |
expression.Orientation
expression Required. An expression that returns a TextFrame object.
Remarks
Some of the constants listed above may not be available to you, depending on the language support (U.S. English, for example) that you’ve selected or installed.
You can set the orientation for a text frame or for a range or selection that happens to occur inside a text frame. For information about the difference between a text frame and a text box, see the TextFrame object.
Example
As it applies to the TextFrame object
This example creates a new document, inserts text into it, uses this text to create a text box, and then sets the orientation of the text frame so that the text slopes upward.
Set mydoc = Documents.Add
Selection.TypeText "This is some text."
mydoc.Content.Select
Selection.CreateTextbox
mydoc.Shapes(1).TextFrame.Orientation = msoTextOrientationUpward
As it applies to the PageSetup object.
This example changes the orientation of the document named "MyDocument.doc" and then prints the document. The example then changes the orientation of the document back to portrait.
Set myDoc = Documents("MyDocument.doc")
With myDoc
.PageSetup.Orientation = wdOrientLandscape
.PrintOut
.PageSetup.Orientation = wdOrientPortrait
End With