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")
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
------------------------------------------------
I tried this, but it prints all the pages not the selection :(

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to