Table of Contents

Method SetColumnWidth

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

SetColumnWidth(WordDocument, Table, int, Twips)

Sets one grid column's width (Word's Table Properties > Column > Preferred width in inches or centimetres): the grid and every cell over the column, in twips; the other columns keep theirs.

public static DocumentEdit SetColumnWidth(this WordDocument document, Table table, int column, Twips width)

Parameters

document WordDocument

The document that holds the table.

table Table

The table.

column int

The 0-based grid column.

width Twips

The width, 15 to 31680 twips.

Returns

DocumentEdit

The edit.

Exceptions

ArgumentNullException

document or table is null.

ArgumentException

The table is not in the document.

ArgumentOutOfRangeException

The column is not one of the grid's, or the width is out of range.