Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Use page styles.

Create a page style called "Landscape", which includes all the page info:

Format -> Styles and Formatting -> Click on the Page Styles icon -> Rightclick on the list -> New

Then apply it to your sheet:

oSheet = ThisComponent.Sheets.getByName("Sheet1")
oSheet.PageStyle = "Landscape"

It is a little convoluted for just setting landscape but it enables you to set everything else as well, which is probably what you really need to do anyway :-)

Andrew