Class TableGeometryExtensions
Word's table geometry as undoable edits (WQ-0117, tools/Probe-WordTableAutoFit.ps1): Layout > AutoFit,
Distribute Columns, and a column's width (Table Properties > Column).
public static class TableGeometryExtensions
- Inheritance
-
TableGeometryExtensions
- Inherited Members
Remarks
Word writes the column widths it measured into the grid after AutoFit Contents; the document model measures nothing, so the grid is left as it is and layout fits the columns to their text (an autofit table's grid is a starting point, which Word recomputes too). A cell spanning several grid columns takes their total.
Fields
- MaxColumnWidth
The widest column a width sets (22 in).
- MinColumnWidth
The narrowest column a width sets (Word's 0.01 in rounds up to this).
Methods
- AutoFitTable(WordDocument, Table, TableAutoFit)
Sizes a table as Word's Layout > AutoFit does.
- DistributeColumns(WordDocument, Table)
Gives every column the same width, their total unchanged (Word's Distribute Columns): the grid and each cell's width in twips.
- SetColumnWidth(WordDocument, Table, int, Twips)
Sets one grid column's width (Word's Table Properties > Column > Preferred width in inches or centimetres): the grid and every cell over the column, in twips; the other columns keep theirs.