Table of Contents

Method FormatCells

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

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

document WordDocument

The document.

span DocumentSpan

The span: both ends in one table.

change Action<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.