Method FormatTable
FormatTable(WordDocument, Table, Action<TableFormat>)
Changes a table's format (style, style options, borders, shading, alignment, width) as one edit.
public static DocumentEdit FormatTable(this WordDocument document, Table table, Action<TableFormat> change)
Parameters
documentWordDocumentThe document that holds the table.
tableTableThe table.
changeAction<TableFormat>Sets the values on a copy of the format.
Returns
- DocumentEdit
The edit; the caret stays at the table's first cell.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
The table is not in
document, or the style it is given is not a table style of the document.