von F3K Total » Di, 29.04.2014 23:26
Moin,
du bist im falschen Forum, die Frage gehört in
OOo Basic und Java
Hier ein Makro, dass funktioniert, trage den Dateispeicherpfad ein, und los.
Code: Alles auswählen
sub S_print_from_current_selection
dim oPrintareas(0) as new com.sun.star.table.CellRangeAddress
Dim myProps(0) as New com.sun.star.beans.PropertyValue
osheet = thiscomponent.currentController.activesheet
osel = thiscomponent.currentselection
oPrintareas(0)= osel.RangeAddress
osheet.setprintareas(oPrintareas)
myProps(0).Name="FilterName"
myProps(0).Value = "calc_pdf_Export"
sUrl = converttourl("C:\Users\<USER>\Desktop\Test.pdf")
ThisComponent.storetoUrl(sUrl,myProps())
End sub
HTH R
Moin,
du bist im falschen Forum, die Frage gehört in [color=#0040FF]OOo Basic und Java[/color]
Hier ein Makro, dass funktioniert, trage den Dateispeicherpfad ein, und los.
[code]sub S_print_from_current_selection
dim oPrintareas(0) as new com.sun.star.table.CellRangeAddress
Dim myProps(0) as New com.sun.star.beans.PropertyValue
osheet = thiscomponent.currentController.activesheet
osel = thiscomponent.currentselection
oPrintareas(0)= osel.RangeAddress
osheet.setprintareas(oPrintareas)
myProps(0).Name="FilterName"
myProps(0).Value = "calc_pdf_Export"
sUrl = converttourl("C:\Users\<USER>\Desktop\Test.pdf")
ThisComponent.storetoUrl(sUrl,myProps())
End sub[/code]
HTH R