0

I have a bunch of cells whose font size I'd like to tweak if their content is overflowing, until it all fits. I'd like to write a macro to do this, unless there's a conditional formatting or other formulaic way of doing it. Is there a property that tells whether a cell is overflowing? If so, what is it?

Kev
  • 15,899
  • 15
  • 79
  • 112

1 Answers1

-2

'open office 3

'get current document
oDoc = ThisComponent

' get first work sheet
oSheet = oDoc.getSheets().getByIndex(0)

'first cell in the work sheet

Cell = oSheet.getCellByPosition(0, 0) MsgBox Cell.CharHeight

Happy Coading :))

kta
  • 19,412
  • 7
  • 65
  • 47
  • I don't think Cell.CharHeight tells me if the cell is horizontally overflowing from having too much content. That's the property I can use to set the font size smaller once I find out whether it's overflowing, but it's the finding out first that I don't know how to do. – Kev Aug 05 '13 at 19:32