Apache OpenOffice (AOO) Bugzilla – Issue 21185
Cannot set PaperOrientation in a macro
Last modified: 2003-10-21 15:12:07 UTC
When trying to set the PaperOrientation in a macro, the changes do not take effect. I've written a small macro that is trying to change the page orientation to landscape through a macro. Upon inspecting the value before I set it, I see that it's value is 0 (portrait). I set the value to 1 for landscape, and inspect the value afterwards. It's set to 1, but once the macro finishes, the paper orientation has not changed. This used to work, I think on version 1.1.0RC4.
Created attachment 10312 [details] Example macro code
reassigend to sw can you please take a look on this issue
.
The setPrinter command is missing in your basic macro, to set the PrintDescriptor. Following macro works just fine for me Dim document As Object Dim printer As Variant document = ThisComponent printer = document.getPrinter for i=0 to UBOUND(printer) if printer(i).Name="PaperOrientation" then printer(i).Value = com.sun.star.view.PaperOrientation.LANDSCAPE endif next i document.setPrinter(printer)
Yep, that fixed it! Thanks!
closed