We may want tis and that. Sometimes we can’t get it.
Well, I suppose you tried something like
whatiWouldLike = createUNOService("com.sun.star.table.CellProperties”)
in a Basic Sub.
What did you get? If I try, I get a Null object. That’s what I expected.
Same with
foobar = CreateUnoStruct("com.sun.star.table.BorderLineStyle")
What did you expect for what reasons?
Let’s try a reasonable example:
Sub doSomethingReasonable()
testRange = ThisComponent.Sheets(0).getCellRangeByName("C4:H11")
Dim tableBorder2 As New com.sun.star.table.TableBorder2
Dim edgeBorder2 As New com.sun.star.table.BorderLine2
Dim innerBorder2 As New com.sun.star.table.BorderLine2
With edgeBorder2
.Color = RGB(016, 000, 240)
.LineWidth = 90
.LineStyle = 7
End With
With innerBorder2
.Color = RGB(255, 016, 000)
.LineWidth = 30
.LineStyle = 0
End With
With tableBorder2
.RightLine = edgeBorder2
.IsRightLineValid = True
.LeftLine = edgeBorder2
.IsLeftLineValid = True
.HorizontalLine = innerBorder2
.IsHorizontalLineValid = True
innerBorder2.Color = RGB(000, 255, 111) REM "On the fly."
innerBorder2.LineWidth = 44 REM again
.VerticalLine = innerBorder2
.IsVerticalLineValid = True
End With
testRange.TableBorder2 = tableBorder2
End Sub