Table of Contents

Method FormatTable

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

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

document WordDocument

The document that holds the table.

table Table

The table.

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