Method AutoFitTable
AutoFitTable(WordDocument, Table, TableAutoFit)
Sizes a table as Word's Layout > AutoFit does.
public static DocumentEdit AutoFitTable(this WordDocument document, Table table, TableAutoFit fit)
Parameters
documentWordDocumentThe document that holds the table.
tableTableThe table.
fitTableAutoFitContents, Window or Fixed Column Width.
Returns
- DocumentEdit
The edit; the caret is not moved.
Exceptions
- ArgumentNullException
documentortableis null.- ArgumentException
The table is not in the document, or the choice is not defined.