The Orientation property returns or specifies the orientation of a page. When setting a different orientation for the page, the values for the width and height are exchanged. The Orientation property returns a value of cdrPageOrientation.
Examples:
The following VBA example inserts a text object on each page, indicating the page orientation of the page.
Sub Test()
Dim Orient As String
Dim p As Page
For Each p In ActiveDocument.Pages
If p.Orientation = cdrPortrait Then
Orient = "Portrait"
Else
Orient = "Landscape"
End If
p.ActiveLayer.CreateArtisticText 0, 0, Orient
Next p
End Sub