# WordTableScope

Edits one WordTable: its fluent methods and keywords, each returning this scope.

Class 

`OfficeIMO.Word`

**Namespace**

`OfficeIMO.Word`

**Assembly**

`OfficeIMO.Word`

**Modifiers**

sealed

Edits one [WordTable](/api/word/officeimo-word-wordtable/): its fluent methods and keywords, each returning this scope.

## Inheritance

- object
- WordTableScope

## Usage

Explore 34 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 28

- Method [WordTableScope.Alignment](/api/word/officeimo-word-wordtablescope/#method-alignment-nullable-officeimo-word-wordtablealignment)
- Method [WordTableScope.AllowOverlap](/api/word/officeimo-word-wordtablescope/#method-allowoverlap-boolean)
- Method [WordTableScope.AllowRowToBreakAcrossPages](/api/word/officeimo-word-wordtablescope/#method-allowrowtobreakacrosspages-boolean)
- Method [WordTableScope.AllowTextWrap](/api/word/officeimo-word-wordtablescope/#method-allowtextwrap-boolean)
- Method [WordTableScope.ColumnWidthsPercentage](/api/word/officeimo-word-wordtablescope/#method-columnwidthspercentage-int32)
- Method [WordTableScope.ConditionalFormattingFirstColumn](/api/word/officeimo-word-wordtablescope/#method-conditionalformattingfirstcolumn-nullable-system-boolean)
- Method [WordTableScope.ConditionalFormattingFirstRow](/api/word/officeimo-word-wordtablescope/#method-conditionalformattingfirstrow-nullable-system-boolean)
- Method [WordTableScope.ConditionalFormattingLastColumn](/api/word/officeimo-word-wordtablescope/#method-conditionalformattinglastcolumn-nullable-system-boolean)
- Method [WordTableScope.ConditionalFormattingLastRow](/api/word/officeimo-word-wordtablescope/#method-conditionalformattinglastrow-nullable-system-boolean)
- Method [WordTableScope.ConditionalFormattingNoHorizontalBand](/api/word/officeimo-word-wordtablescope/#method-conditionalformattingnohorizontalband-nullable-system-boolean)
- Method [WordTableScope.ConditionalFormattingNoVerticalBand](/api/word/officeimo-word-wordtablescope/#method-conditionalformattingnoverticalband-nullable-system-boolean)
- Method [WordTableScope.Description](/api/word/officeimo-word-wordtablescope/#method-description-string)
- Method [WordTableScope.FirstRow](/api/word/officeimo-word-wordtablescope/#method-firstrow-action-officeimo-word-wordtablerow)
- Method [WordTableScope.FitText](/api/word/officeimo-word-wordtablescope/#method-fittext-boolean)
- Method [WordTableScope.FixedWidth](/api/word/officeimo-word-wordtablescope/#method-fixedwidth-int32)
- Method [WordTableScope.LastRow](/api/word/officeimo-word-wordtablescope/#method-lastrow-action-officeimo-word-wordtablerow)
- Method [WordTableScope.LayoutMode](/api/word/officeimo-word-wordtablescope/#method-layoutmode-officeimo-word-wordtablelayoutmode)
- Method [WordTableScope.ParentTable](/api/word/officeimo-word-wordtablescope/#method-parenttable-action-officeimo-word-wordtable)
- Method [WordTableScope.Position](/api/word/officeimo-word-wordtablescope/#method-position-action-officeimo-word-wordtableposition)
- Method [WordTableScope.RepeatAsHeaderRowAtTheTopOfEachPage](/api/word/officeimo-word-wordtablescope/#method-repeatasheaderrowatthetopofeachpage-boolean)
- Method [WordTableScope.RepeatHeaderRowAtTheTopOfEachPage](/api/word/officeimo-word-wordtablescope/#method-repeatheaderrowatthetopofeachpage-boolean)
- Method [WordTableScope.Row](/api/word/officeimo-word-wordtablescope/#method-row-int32-action-officeimo-word-wordtablerowscope)
- Method [WordTableScope.Style](/api/word/officeimo-word-wordtablescope/#method-style-nullable-officeimo-word-wordtablestyle)
- Method [WordTableScope.StyleId](/api/word/officeimo-word-wordtablescope/#method-styleid-string)
- Method [WordTableScope.Title](/api/word/officeimo-word-wordtablescope/#method-title-string)
- Method [WordTableScope.Width](/api/word/officeimo-word-wordtablescope/#method-width-nullable-officeimo-word-wordtablewidth)
- Method [WordTableScope.WidthPercentage](/api/word/officeimo-word-wordtablescope/#method-widthpercentage-int32)
- Method [WordTableScope.WrapText](/api/word/officeimo-word-wordtablescope/#method-wraptext-boolean)

### Accepted by parameters 6

- Method [WordDocumentScope.Table](/api/word/officeimo-word-worddocumentscope/#method-table-collections-generic-ienumerable-system-object-officeimo-officetableoptions-action-officeimo-word-wordtablescope) parameter `configure`
- Method [WordFooterScope.Table](/api/word/officeimo-word-wordfooterscope/#method-table-int32-int32-officeimo-word-wordtablestyle-action-officeimo-word-wordtablescope) parameter `configure`
- Method [WordHeaderScope.Table](/api/word/officeimo-word-wordheaderscope/#method-table-int32-int32-officeimo-word-wordtablestyle-action-officeimo-word-wordtablescope) parameter `configure`
- Method [WordSectionScope.Table](/api/word/officeimo-word-wordsectionscope/#method-table-int32-int32-officeimo-word-wordtablestyle-action-officeimo-word-wordtablescope) parameter `configure`
- Method [WordTableBuilder.Configure](/api/word/officeimo-word-wordtablebuilder/#method-configure-action-officeimo-word-wordtablescope) parameter `configure`
- Method [WordTableCellScope.Table](/api/word/officeimo-word-wordtablecellscope/#method-table-int32-int32-officeimo-word-wordtablestyle-boolean-action-officeimo-word-wordtablescope) parameter `configure`

Filter members 

Show inherited

## Methods

`public WordTableScope Alignment(WordTableAlignment? value)` [#](#method-alignment-nullable-officeimo-word-wordtablealignment)

Sets [WordTable.Alignment](/api/word/officeimo-word-wordtable/): Gets or sets the horizontal alignment of the table within the page. Logical start/end values read from a document resolve using the table's declared direction.

Parameters

**value OfficeIMO.Word.WordTableAlignment? required**

The value.

Returns

`WordTableScope` The same scope.

`public WordTableScope AllowOverlap(bool value = true)` [#](#method-allowoverlap-boolean)

Sets [WordTable.AllowOverlap](/api/word/officeimo-word-wordtable/): Allow table to overlap or not

Parameters

**value bool = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope AllowRowToBreakAcrossPages(bool value = true)` [#](#method-allowrowtobreakacrosspages-boolean)

Sets [WordTable.AllowRowToBreakAcrossPages](/api/word/officeimo-word-wordtable/): Allow row to break across pages This sets each row to allow page break You can set each row separately as well Getting value returns true if any row allows page break For complete control use WordTableRow.AllowRowToBreakAcrossPages

Parameters

**value bool = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope AllowTextWrap(bool value = true)` [#](#method-allowtextwrap-boolean)

Sets [WordTable.AllowTextWrap](/api/word/officeimo-word-wordtable/): Allow text to wrap around table.

Parameters

**value bool = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope ColumnWidthsPercentage(params int[] percentages)` [#](#method-columnwidthspercentage-int32)

Sets column widths using percentages. Values are scaled proportionally when they don't sum to 100.

Parameters

**percentages int[] required**

Column percentages in any positive ratio.

Returns

`WordTableScope` The same scope.

`public WordTableScope ConditionalFormattingFirstColumn(bool? value = true)` [#](#method-conditionalformattingfirstcolumn-nullable-system-boolean)

Sets [WordTable.ConditionalFormattingFirstColumn](/api/word/officeimo-word-wordtable/): Specifies that the first column conditional formatting shall be applied to the table.

Parameters

**value bool? = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope ConditionalFormattingFirstRow(bool? value = true)` [#](#method-conditionalformattingfirstrow-nullable-system-boolean)

Sets [WordTable.ConditionalFormattingFirstRow](/api/word/officeimo-word-wordtable/): Specifies that the first row conditional formatting shall be applied to the table.

Parameters

**value bool? = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope ConditionalFormattingLastColumn(bool? value = true)` [#](#method-conditionalformattinglastcolumn-nullable-system-boolean)

Sets [WordTable.ConditionalFormattingLastColumn](/api/word/officeimo-word-wordtable/): Specifies that the last column conditional formatting shall be applied to the table.

Parameters

**value bool? = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope ConditionalFormattingLastRow(bool? value = true)` [#](#method-conditionalformattinglastrow-nullable-system-boolean)

Sets [WordTable.ConditionalFormattingLastRow](/api/word/officeimo-word-wordtable/): Specifies that the last row conditional formatting shall be applied to the table.

Parameters

**value bool? = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope ConditionalFormattingNoHorizontalBand(bool? value = true)` [#](#method-conditionalformattingnohorizontalband-nullable-system-boolean)

Sets [WordTable.ConditionalFormattingNoHorizontalBand](/api/word/officeimo-word-wordtable/): Specifies that the horizontal banding conditional formatting shall not be applied to the table.

Parameters

**value bool? = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope ConditionalFormattingNoVerticalBand(bool? value = true)` [#](#method-conditionalformattingnoverticalband-nullable-system-boolean)

Sets [WordTable.ConditionalFormattingNoVerticalBand](/api/word/officeimo-word-wordtable/): Specifies that the vertical banding conditional formatting shall not be applied to the table.

Parameters

**value bool? = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope Description(string? value)` [#](#method-description-string)

Sets [WordTable.Description](/api/word/officeimo-word-wordtable/): Gets or sets Description for a Table

Parameters

**value string? required**

The value.

Returns

`WordTableScope` The same scope.

`public WordTableScope FirstRow(Action<WordTableRow> configure)` [#](#method-firstrow-action-officeimo-word-wordtablerow)

Configures [WordTable.FirstRow](/api/word/officeimo-word-wordtable/) in place: Gets the first row of the table.

Parameters

**configure System.Action<OfficeIMO.Word.WordTableRow> required**

Configures the value.

Returns

`WordTableScope` The same scope.

`public WordTableScope FitText(bool value = true)` [#](#method-fittext-boolean)

Sets [WordTable.FitText](/api/word/officeimo-word-wordtable/): Gets or sets whether text is compressed to fit within all cells of the table.

Parameters

**value bool = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope FixedWidth(int percentage)` [#](#method-fixedwidth-int32)

Sets the table to Fixed Width with the specified percentage

Parameters

**percentage int required**

Width percentage (0-100)

Returns

`WordTableScope` The same scope.

`public WordTableScope LastRow(Action<WordTableRow> configure)` [#](#method-lastrow-action-officeimo-word-wordtablerow)

Configures [WordTable.LastRow](/api/word/officeimo-word-wordtable/) in place: Gets the last row of the table.

Parameters

**configure System.Action<OfficeIMO.Word.WordTableRow> required**

Configures the value.

Returns

`WordTableScope` The same scope.

`public WordTableScope LayoutMode(WordTableLayoutMode value)` [#](#method-layoutmode-officeimo-word-wordtablelayoutmode)

Sets [WordTable.LayoutMode](/api/word/officeimo-word-wordtable/): Gets or sets the layout algorithm used by Word for the table. Changing the algorithm preserves the table and cell preferred widths. Use [WordTable.AutoFitToWindow](/api/word/officeimo-word-wordtable/) or [WordTable.SetFixedWidth](/api/word/officeimo-word-wordtable/) when the width should also change.

Parameters

**value OfficeIMO.Word.WordTableLayoutMode required**

The value.

Returns

`WordTableScope` The same scope.

`public WordTableScope ParentTable(Action<WordTable> configure)` [#](#method-parenttable-action-officeimo-word-wordtable)

Configures [WordTable.ParentTable](/api/word/officeimo-word-wordtable/) in place: Gets nested table parent table if table is nested table

Parameters

**configure System.Action<OfficeIMO.Word.WordTable> required**

Configures the value.

Returns

`WordTableScope` The same scope.

`public WordTableScope Position(Action<WordTablePosition> configure)` [#](#method-position-action-officeimo-word-wordtableposition)

Configures [WordTable.Position](/api/word/officeimo-word-wordtable/) in place: Provides positioning information for the table within the document.

Parameters

**configure System.Action<OfficeIMO.Word.WordTablePosition> required**

Configures the value.

Returns

`WordTableScope` The same scope.

`public WordTableScope RepeatAsHeaderRowAtTheTopOfEachPage(bool value = true)` [#](#method-repeatasheaderrowatthetopofeachpage-boolean)

Sets [WordTable.RepeatAsHeaderRowAtTheTopOfEachPage](/api/word/officeimo-word-wordtable/): Allow Header to repeat on each page This applies to only header of the table (first row)

Parameters

**value bool = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope RepeatHeaderRowAtTheTopOfEachPage(bool value = true)` [#](#method-repeatheaderrowatthetopofeachpage-boolean)

Sets [WordTable.RepeatHeaderRowAtTheTopOfEachPage](/api/word/officeimo-word-wordtable/): Specifies that the first row shall be repeated at the top of each page on which the table is displayed.

Parameters

**value bool = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

`public WordTableScope Row(int cellsCount = 0, Action<WordTableRowScope>? configure = null)` [#](#method-row-int32-action-officeimo-word-wordtablerowscope)

Add row to an existing table with the specified number of columns

Parameters

**cellsCount int = 0 optional**

The value.

**configure System.Action<OfficeIMO.Word.WordTableRowScope>? = null optional**

Configures the new item through its scope.

Returns

`WordTableScope` The same scope.

Style 2 overloads

`public WordTableScope Style(WordStyle style)` [#](#method-style-officeimo-word-wordstyle)

Applies a table style defined in this table's document.

Parameters

**style OfficeIMO.Word.WordStyle required**

A table style from [WordDocument.Styles](/api/word/officeimo-word-worddocument/).

Returns

`WordTableScope` The same scope.

`public WordTableScope Style(WordTableStyle? value)` [#](#method-style-nullable-officeimo-word-wordtablestyle)

Sets [WordTable.Style](/api/word/officeimo-word-wordtable/): Gets or sets the built-in table style applied to this table. Returns null when no built-in style is assigned. Set null to remove the style reference.

Parameters

**value OfficeIMO.Word.WordTableStyle? required**

The value.

Returns

`WordTableScope` The same scope.

`public WordTableScope StyleId(string styleId)` [#](#method-styleid-string)

Applies a table style defined in the document.

Parameters

**styleId string required**

Identifier of the table style to apply.

Returns

`WordTableScope` The same scope.

`public WordTableScope Title(string? value)` [#](#method-title-string)

Sets [WordTable.Title](/api/word/officeimo-word-wordtable/): Gets or sets a Title/Caption to a Table

Parameters

**value string? required**

The value.

Returns

`WordTableScope` The same scope.

`public WordTableScope Width(WordTableWidth? value)` [#](#method-width-nullable-officeimo-word-wordtablewidth)

Sets [WordTable.Width](/api/word/officeimo-word-wordtable/): Gets or sets the directly authored preferred width. Null removes tblW and preserves the grid.

Parameters

**value OfficeIMO.Word.WordTableWidth? required**

The value.

Returns

`WordTableScope` The same scope.

`public WordTableScope WidthPercentage(int percentage)` [#](#method-widthpercentage-int32)

Sets the table width to a percentage of the window width

Parameters

**percentage int required**

Width percentage (0-100)

Returns

`WordTableScope` The same scope.

`public WordTableScope WrapText(bool value = true)` [#](#method-wraptext-boolean)

Sets [WordTable.WrapText](/api/word/officeimo-word-wordtable/): Gets or sets whether text wraps within all cells of the table.

Parameters

**value bool = true optional**

The value; true when omitted.

Returns

`WordTableScope` The same scope.

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public WordTable Model { get; }` [#](#property-model)

The [WordTable](/api/word/officeimo-word-wordtable/) this scope edits, for plain C# inside a lambda.

<!-- PowerForge markdown artifact sha256:5B856F35EDD234337DAC1FE438186382DB085D1063716B13B19253FA139417BE -->
