Stampa na vise stampaca
|
|
|||
Postovani, pratim ovaj forum i iz njega dosta zanimljivog video i naucio.
Imam problem sa stampanjem, naime, na racunaru imam 4 stampaca i imam problem kako da odredjene listove dokumenta saljem na razlicite stampace preko macro-a, a da bude odstampan na tacno odredjenom stampacu. Calc pamti zadnji stampac na koji je nesto poslato i to primenjuje na sve ostale listove jednog dokumenta. Ovo mi je potrebno je zato sto su u stampacima razliciti formulari. |
|||
|
|||
Definišite opsege za štampanje i štampajte pojedinačne stranice. Stranice navodite kao Pages svojstvo PrintProperties objekta.
Više pogledajte ovde http://www.oooforum.org/forum/viewtopic.phtml?t=11897 |
|||
|
|||
Meni ovo nikako ne ide. "Napravio" sam dva makroa i u oba slucaja stampa mi samo podrazumevani stampac. Evo koda, pa ako Vam nije tesko, pomozite.
sub Stampac4 oDoc = ThisComponent Dim mPrinter(0) As New com.sun.star.beans.PropertyValue mPrinter(0).Name="Name" mPrinter(0).value="<Epson LX-300>" oDoc.Printer = mPrinter() 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(0) as new com.sun.star.beans.PropertyValue args1(0).Name = "ToPoint" args1(0).Value = "$A$1:$u$44" dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1()) rem ---------------------------------------------------------------------- dim args2(1) as new com.sun.star.beans.PropertyValue args2(0).Name = "Copies" args2(0).Value = 1 args2(1).Name = "Collate" args2(1).Value = true dispatcher.executeDispatch(document, ".uno:Print", "", 0, args2()) rem Dim mPrintOpts(0) As New com.sun.star.beans.PropertyValue rem oDoc.Print(mPrintOpts()) end sub sub Stampac5 oDoc = ThisComponent Dim mPrinter(0) As New com.sun.star.beans.PropertyValue mPrinter(0).Name="Name" mPrinter(0).value="<HP LaserJet 1020>" oDoc.Printer = mPrinter() Dim mPrintOpts(0) As New com.sun.star.beans.PropertyValue oDoc.Print(mPrintOpts()) end sub Napominjem da mi pisanje makroa ide dosta traljavo, uglavnom koristim record macro, pa onda doterujem i spravljam. Unapred zahvalan. |
|||