Table of Contents

Method AutoFitTable

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

AutoFitTable(WordDocument, Table, TableAutoFit)

Sizes a table as Word's Layout > AutoFit does.

public static DocumentEdit AutoFitTable(this WordDocument document, Table table, TableAutoFit fit)

Parameters

document WordDocument

The document that holds the table.

table Table

The table.

fit TableAutoFit

Contents, Window or Fixed Column Width.

Returns

DocumentEdit

The edit; the caret is not moved.

Exceptions

ArgumentNullException

document or table is null.

ArgumentException

The table is not in the document, or the choice is not defined.