Hello,
I can set Print Area as below. I can’t find how to add Print area, does someone know?
Thanks!
Dim printRange(0) As New com.sun.star.table.CellRangeAddress
Dim oSheet As Object
Dim oSheetIndex As Integer
oSheet = ThisComponent.Sheets.GetByIndex(0)
oSheetIndex = oSheetDestination.RangeAddress.Sheet
' prepare for set up print area
printRange(0).Sheet = oSheetIndex
printRange(0).StartColumn = 0
printRange(0).StartRow = 0
printRange(0).EndColumn = 5
printRange(0).EndRow = 5
' set a print area
oSheet.setPrintAreas( printRange() )
'oSheet.addPrintArea( printRange() ) - ERROR: function doesn't exist