[Solved] Setting "Optimal zoom" in Writer
Posted: Wed Apr 22, 2015 3:32 pm
In Writer, I can use View | Zoom and then I have choices such as "Entire Page", "Page Width", and "Optimal View". Anyone know how to access these?
Thanks to Zizi64 (see viewtopic.php?f=20&t=43418). I know how to set the "zoom percentage", this macro sets to 120% in both Calc and in Write (the only two I tested)
Something I have never done, but have considered.... is there any easy way for me to understand what the parameters do? For example, "Zoom.Type" and "Zoom.ValueSet"?
I suppose that what I really need to do is just grab the latest source and start searching it.
Thanks to Zizi64 (see viewtopic.php?f=20&t=43418). I know how to set the "zoom percentage", this macro sets to 120% in both Calc and in Write (the only two I tested)
Code: Select all
sub zoom2
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(2) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Zoom.Value"
args1(0).Value = 120
args1(1).Name = "Zoom.ValueSet"
args1(1).Value = 28703
args1(2).Name = "Zoom.Type"
args1(2).Value = 0
dispatcher.executeDispatch(document, ".uno:Zoom", "", 0, args1())
end subI suppose that what I really need to do is just grab the latest source and start searching it.