I'm trying to merge some cells in a table in Writer programmatically. My current code (all variables are declared):
Code: Select all
Set cell= anchor.Cell
Set tbl= anchor.textTable
col = Asc(Left$(cell.CellName,1)) - Asc("A")
row = CInt(Mid$(cell.CellName, 2)) - 1
rf1= Chr$(Asc("A")+ col) & (row+1) & ":" & Chr$(Asc("A")+ tbl.getColumns().getCount()-1) & (row+1)
Set cr2= tbl.getCellRangeByName(rf1)
Call cr2.merge(True)
How can I merge some cells in code?
TIA