Reputation: 720
Is it possible to vertically align text so it is vertically centered in a table cell?
Upvotes: 4
Views: 7391
Reputation: 5450
from docx.enum.table import WD_ALIGN_VERTICAL
table = document.add_table(3, 3)
table.cell(0, 0).vertical_alignment = WD_ALIGN_VERTICAL.BOTTOM
https://python-docx.readthedocs.io/en/latest/api/enum/WdCellVerticalAlignment.html
Upvotes: 4
Reputation: 1
Tablename.Rows(0).Cells(0).VerticalAlignment = VerticalAlignment.Center
Upvotes: 0