DIY: Vertical alignment of text in LibreOffice

Jack Wallen describes how to vertically align text in a LibreOffice document. He also urges LibreOffice developers to add this basic feature.

The developers of LibreOffice and OpenOffice have not listened to the thousands of users who are begging for the very basic feature of vertical text alignment. Although it is possible to vertically align an object in Draw as well as nearly anything within a table cell, it's not possible to align a paragraph on a page. This leads us to our question of the week: Is it possible to vertically align text in a LibreOffice document?

Yes, it is possible, but it's not easy to do. You can insert a single table cell, set the alignment to vertical, and then start adding your text. When you're finished typing, drag the bottom border of the cell to the bottom of the page, and then remove the border when you're done. This is really cumbersome.

You would ideally be able to create a macro that handles the following:

  • Inserts a single table cell.
  • Sets the table cell alignment to vertical.
  • Sets the cell size to cover the entire page.
  • Removes the cell border.

This would make the process very simple; however, the macro recording feature in LibreOffice has these limitations:

  • Opening of windows is not recorded.
  • Actions carried out in another window than where the recorder was started are not recorded.
  • Window switching is not recorded.
  • Actions that are not related to the document contents are not recorded. For example, changes made in the Options dialog, macro organizer, customizing.
  • Selections are recorded only if they are done by using the keyboard (cursor traveling), but not when the mouse is used.
  • The macro recorder works only in Calc and Writer.

It's the second point that causes us problems, because the table cell properties are configured in a new window. So, effectively a fully-realized macro cannot be created. You can, however, save yourself a few steps by recording the macro to add the table cell and then set the alignment to vertical. Create that and then add a button to the toolbar for that macro. Now all you have to do is click the Macro button to add the cell and align the text. Then you can type your text, stretch the cell to fit the entire column of the page, and then remove the border.

I hope the LibreOffice developers listen to users' complaints about this issue. This is a no-brainer, and this feature should have been made available long ago.

Ask Jack: If you have a DIY question, email it to me, and I'll do my best to answer it. (Read guidelines about submitting DIY questions.)