Portrait or landscape printing mode.
[Visual Basic] Property Orientation As XlPageOrientation [C#] XlPageOrientation Orientation { get; set; } [C++] __property XlPageOrientation get_Orientation(); __property void set_Orientation(XlPageOrientation ); [JScript] function get Orientation() : XlPageOrientation function set Orientation(XlPageOrientation);
Orientation can be one of XlPageOrientation values.
This example sets the first sheet to be printed in landscape orientation.
[C#]
book.Worksheets[1].PageSetup.Orientation = XlPageOrientation.xlLandscape;
[Visual Basic]
book.Worksheets(1).PageSetup.Orientation = XlPageOrientation.xlLandscape
[C++]
book->Worksheets->Item[1]->PageSetup->Orientation = XlPageOrientation::xlLandscape;
IPageSetup Interface | NativeExcel Namespace | XlPageOrientation Enumeration | PageSetup Property