Code to print two copies from selected sheet
Posted: Thu Mar 20, 2008 10:56 am
Im using openoffice calc and I've got this code
At the moment it does nothing but prints all sheets that have something written on them, but what it should do is that it should print only selected sheets twice (also know as "make a copy of them"). So if there is any code or anything that you can assist me with i would be very grateful, thanks.
EDIT: I have even checked all the pring range topics but all they do is tell me how can print sheets from X to Z and not how i can print those sheets that i have selected.
Code: Select all
oDoc = ThisComponent
Dim Props(0) As New com.sun.star.beans.PropertyValue
Props(0).Name = "CopyCount" : Props(0).Value = 2
Props(0).Name = "Sort" : Props(0).Value = True
ThisComponent.Print(Props())
EDIT: I have even checked all the pring range topics but all they do is tell me how can print sheets from X to Z and not how i can print those sheets that i have selected.