Has anyone gotten TableBorder to work putting a border around a range of cells?
From what I read this should work but I don’t see a border when run.
aRange = ThisComponent.CurrentController.ActiveSheet.getCellRangeByName("B2:C3") setRangeBorder(aRange) Sub setRangeBorder(oRange) ' doesn't seem to be working for me, don't see why Dim oBorder, oTBorder oBorder = CreateUnoStruct("com.sun.star.table.BorderLine") oBorder.Color = RGB(150, 150, 150) oBorder.OuterLineWidth = 35 oBorder.InnerLineWidth = 35 oBorder.LineDistance = 3 oTBorder = CreateUnoStruct("com.sun.star.table.TableBorder") oTBorder.IsLeftLineValid = True oTBorder.IsTopLineValid = True oTBorder.IsRightLineValid = True oTBorder.IsBottomLineValid = True oTBorder.LeftLine = oBorder oTBorder.TopLine = oBorder oTBorder.RightLine = oBorder oTBorder.BottomLine = oBorder oRange.TableBorder = oTBorder End Sub
I’m hoping someone will show me the error of my ways or point me towards a working example.
To further complicate matters, Pitonyak’s OOME Listing 411 when I run it doesn’t give me the blue boxes only 2 red lines. Can there be something I’ve set to prevent it from running for me as it did for him?
Thanks,
Mike