Re: Versionsupdate ..
Verfasst: Di, 03.03.2009 20:48
da hat's mich doch glatt abgemeldet das System ... war zu langsamm.
also nicht Gast ... ich wars.
Ford
also nicht Gast ... ich wars.
Ford
deutsches Forum rund um Apache OpenOffice und LibreOffice
http://de.openoffice.info/
Code: Alles auswählen
Sub optidruck
vorgabe = 0
status = 8
DIM zeile(15)
zeile = ARRAY (17,35,53,71,89,15,33,51,69,87,13,31,49,67,85)
For x = 0 to 14
If status >= 0 Then
If ThisComponent.Sheets.GetByName("Woche1").getCellByPosition(vorgabe, zeile(x)-1).String = "" Then
ThisComponent.Sheets.GetByName("Woche1").Rows(zeile(x)).isVisible = False
ThisComponent.Sheets.GetByName("Woche1").Rows(zeile(x)-1).isVisible = False
status = status - 1
End if
End if
Next x
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oDoc=thisComponent
Sheet = oDoc.Sheets(8)
Cell = Sheet.getCellByPosition(11, 7)
printerbez = Cell.String
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Printer"
args1(0).Value = printerbez
dispatcher.executeDispatch(document, ".uno:Printer", "", 0, args1())
rem ----------------------------------------------------------------------
dim args2(2) as new com.sun.star.beans.PropertyValue
args2(0).Name = "Copies"
args2(0).Value = 1
args2(1).Name = "Selection"
args2(1).Value = true
args2(2).Name = "Collate"
args2(2).Value = false
dispatcher.executeDispatch(document, ".uno:Print", "", 0, args2())
dispatcher.executeDispatch(document, ".uno:SelectAll", "", 0, Array())
dispatcher.executeDispatch(document, ".uno:ShowRow", "", 0, Array())
end sub
Code: Alles auswählen
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
oDoc=thisComponent
Sheet = oDoc.Sheets(8)
Cell = Sheet.getCellByPosition(11, 7)
printerbez = Cell.String
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Printer"
args1(0).Value = printerbez
dispatcher.executeDispatch(document, ".uno:Printer", "", 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 = false
dispatcher.executeDispatch(document, ".uno:Print", "", 0, args2())
dim args3(0) as new com.sun.star.beans.PropertyValue
args3(0).Name = "Nr"
args3(0).Value = 1
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args3())
dispatcher.executeDispatch(document, ".uno:SelectAll", "", 0, Array())
dispatcher.executeDispatch(document, ".uno:ShowRow", "", 0, Array())
rem ----------------------------------------------------------------------
dim args4(0) as new com.sun.star.beans.PropertyValue
..... für alle Tabellen und 2 weitere Druckbereiche