Table of Contents

Method MergeCells

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

MergeCells(WordDocument, TableCell, TableCell)

Merges the rectangle of whole cells whose corners are two cells into one cell.

public static DocumentEdit MergeCells(this WordDocument document, TableCell first, TableCell last)

Parameters

document WordDocument

The document that holds the cells.

first TableCell

One corner.

last TableCell

The opposite corner, in the same table.

Returns

DocumentEdit

The edit; After is the start of the merged cell.

Exceptions

ArgumentNullException

An argument is null.

ArgumentException

The cells are not in one table of document, or do not bound a rectangle of whole cells.

InvalidOperationException

A vertical merge crosses the rectangle's top or bottom edge.