Method FormatCells
FormatCells(WordDocument, DocumentSpan, Action<CellFormat>)
Changes the format of the cells a span covers (shading, borders, vertical alignment, margins) as one edit.
public static DocumentEdit FormatCells(this WordDocument document, DocumentSpan span, Action<CellFormat> change)
Parameters
documentWordDocumentThe document.
spanDocumentSpanThe span: both ends in one table.
changeAction<CellFormat>Sets the values on a copy of each cell's format.
Returns
- DocumentEdit
The edit; the caret stays where the span was.
Exceptions
- ArgumentNullException
An argument is null.
- ArgumentException
An end is not in
document, or the two ends are not in one table.