Table Cell ========== All content in a table is contained in a cell. A cell also has several properties affecting its size, appearance, and how the content it contains is formatted. Candidate protocol ------------------ Cell.vertical_alignment:: >>> from docx.enum.table import WD_CELL_ALIGN_VERTICAL >>> cell = table.add_row().cells[0] >>> cell >>> cell.vertical_alignment None >>> cell.vertical_alignment = WD_CELL_ALIGN_VERTICAL.CENTER >>> print(cell.vertical_alignment) CENTER (1) MS API - Partial Summary ------------------------ * Merge() * Split() * Borders * BottomPadding (and Left, Right, Top) * Column * ColumnIndex * FitText * Height * HeightRule (one of WdRowHeightRule_ enumeration) * Preferred Width * Row * RowIndex * Shading * Tables * VerticalAlignment * Width * WordWrap WD_ALIGN_VERTICAL Enumeration --------------------------------- wdAlignVerticalBoth (101) This is an option in the OpenXml spec, but not in Word itself. It's not clear what Word behavior this setting produces. If you find out please let us know and we'll update the documentation. Otherwise, probably best to avoid this option. wdAlignVerticalBottom (3) Text is aligned to the bottom border of the cell. wdAlignVerticalCenter (1) Text is aligned to the center of the cell. wdAlignVerticalTop (0) Text is aligned to the top border of the cell. Specimen XML ------------ .. highlight:: xml :: Amy earned her BA in American Studies Schema Definitions ------------------ .. highlight:: xml :: .. _`WdRowHeightRule`: http://msdn.microsoft.com/en-us/library/office/ff193620(v=office.15).aspx