Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordTableScope

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Modifiers
sealed

Edits one 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.

Accepted by parameters 6

Methods

public WordTableScope Alignment(WordTableAlignment? value) #

Sets WordTable.Alignment: 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) #

Sets WordTable.AllowOverlap: 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) #

Sets WordTable.AllowRowToBreakAcrossPages: 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) #

Sets WordTable.AllowTextWrap: 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) #

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) #

Sets WordTable.ConditionalFormattingFirstColumn: 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) #

Sets WordTable.ConditionalFormattingFirstRow: 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) #

Sets WordTable.ConditionalFormattingLastColumn: 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) #

Sets WordTable.ConditionalFormattingLastRow: 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) #

Sets WordTable.ConditionalFormattingNoHorizontalBand: 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) #

Sets WordTable.ConditionalFormattingNoVerticalBand: 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) #

Sets WordTable.Description: Gets or sets Description for a Table

Parameters

value string? required
The value.

Returns

WordTableScope The same scope.
public WordTableScope FirstRow(Action<WordTableRow> configure) #

Configures WordTable.FirstRow 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) #

Sets WordTable.FitText: 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) #

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) #

Configures WordTable.LastRow 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) #

Sets WordTable.LayoutMode: 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 or WordTable.SetFixedWidth 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) #

Configures WordTable.ParentTable 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) #

Configures WordTable.Position 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) #

Sets WordTable.RepeatAsHeaderRowAtTheTopOfEachPage: 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) #

Sets WordTable.RepeatHeaderRowAtTheTopOfEachPage: 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) #

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) #

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

Parameters

style OfficeIMO.Word.WordStyle required
A table style from WordDocument.Styles.

Returns

WordTableScope The same scope.
public WordTableScope Style(WordTableStyle? value) #

Sets WordTable.Style: 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) #

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) #

Sets WordTable.Title: 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) #

Sets WordTable.Width: 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) #

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) #

Sets WordTable.WrapText: 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.

Properties

public WordTable Model { get; } #

The WordTable this scope edits, for plain C# inside a lambda.