Table of Contents

Method InsertColumns

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

InsertColumns(WordDocument, TableCell, int, bool)

Inserts grid columns before or after a cell's columns, formatted like the cells beside them.

public static DocumentEdit InsertColumns(this WordDocument document, TableCell cell, int count, bool after)

Parameters

document WordDocument

The document that holds the cell.

cell TableCell

The cell to insert beside.

count int

The number of columns, at least 1.

after bool

True to insert after the cell, false before.

Returns

DocumentEdit

The edit; After is the start of the new cell beside cell.

Exceptions

ArgumentNullException

document or cell is null.

ArgumentException

The cell is not in a table of document.

ArgumentOutOfRangeException

count is less than 1, or the table would have more than 63 columns.