List Info

Thread: Multiple cells in macros




Multiple cells in macros
user name
2006-05-18 12:15:24
Hi Moisés,

> I saw it before. But if the sheet don't fit in a page
... what can I do ?

from the top of my head I'd suggest to select the sheet you
want to 
print and then print the current selection. Somethings like
the 
following should print the sheets 4 and 5

------------------------------------------------
sub Main
ThisComponent.currentController.select(ThisComponent.Sheets(
3))
printSelection
ThisComponent.currentController.select(ThisComponent.Sheets(
4))
printSelection	
end sub


sub printSelection
xFrame   = ThisComponent.CurrentController.Frame
dispatcher =
createUnoService("com.sun.star.frame.DispatchHelper&q
uot;)
dim args(0) as new com.sun.star.beans.PropertyValue
args(0).Name = "Selection"
args(0).Value = true
dispatcher.executeDispatch(xFrame, ".uno:Print",
"", 0, args())
end sub
------------------------------------------------

Hope that helps

Regards

Stephan

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )