I try to resize/shrink a column in a Text table in OOo Writer with macro commands. I can insert content into the table cells, can modify the borders (of the cells), but I have no clue how I can change the size of the two columns from the inital 50% and 50% to a smaller first column.
Resizing Columns in Calc is no problem. But that method oSheet.Columns(0).Width = 450 won't work in Writer. The Xray inspection tool shows me that the table in Calc supports far more services than the table in Writer. The following 3 services is all I have for a writer table:
- com.sun.star.document.LinkTarget
- com.sun.star.text.TextSortable
- com.sun.star.text.TextTable
I think those allow me to resize cells and columns.
I tried to set the OptimalWidth for a column in the Writer table
Code: Select all
oColumns = oTable.getColumns()
Xray oColumns
oColumns.getByIndex(0).OptimalWidth = True
Any ideas how to deal with this are appreciated. Thanks, rudolfo.