Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordTableFluent

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Modifiers
static

The fluent methods of WordTable, generated from its public properties: A property-named method sets a property and a singular-named method adds to a collection, both returning the same instance.

Inheritance

  • object
  • WordTableFluent

Methods

public static TSelf Alignment<TSelf>(TSelf wordTable, 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.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value OfficeIMO.Word.WordTableAlignment? required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
wordTable.Alignment = value;     wordTable.Alignment(value);
public static TSelf AllowOverlap<TSelf>(TSelf wordTable, bool value = true) #

Sets WordTable.AllowOverlap: Allow table to overlap or not

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property      // C# fluent
wordTable.AllowOverlap = value;    wordTable.AllowOverlap(value);
public static TSelf AllowRowToBreakAcrossPages<TSelf>(TSelf wordTable, 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

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property                    // C# fluent
wordTable.AllowRowToBreakAcrossPages = value;    wordTable.AllowRowToBreakAcrossPages(value);
public static TSelf AllowTextWrap<TSelf>(TSelf wordTable, bool value = true) #

Sets WordTable.AllowTextWrap: Allow text to wrap around table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property       // C# fluent
wordTable.AllowTextWrap = value;    wordTable.AllowTextWrap(value);
public static TSelf ColumnWidthsPercentage<TSelf>(TSelf wordTable, params int[] percentages) #

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

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
percentages int[] required
Column percentages in any positive ratio.

Returns

TSelf The same instance.
public static TSelf ConditionalFormattingFirstColumn<TSelf>(TSelf wordTable, bool? value = true) #

Sets WordTable.ConditionalFormattingFirstColumn: Specifies that the first column conditional formatting shall be applied to the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool? = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property                          // C# fluent
wordTable.ConditionalFormattingFirstColumn = value;    wordTable.ConditionalFormattingFirstColumn(value);
public static TSelf ConditionalFormattingFirstRow<TSelf>(TSelf wordTable, bool? value = true) #

Sets WordTable.ConditionalFormattingFirstRow: Specifies that the first row conditional formatting shall be applied to the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool? = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property                       // C# fluent
wordTable.ConditionalFormattingFirstRow = value;    wordTable.ConditionalFormattingFirstRow(value);
public static TSelf ConditionalFormattingLastColumn<TSelf>(TSelf wordTable, bool? value = true) #

Sets WordTable.ConditionalFormattingLastColumn: Specifies that the last column conditional formatting shall be applied to the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool? = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property                         // C# fluent
wordTable.ConditionalFormattingLastColumn = value;    wordTable.ConditionalFormattingLastColumn(value);
public static TSelf ConditionalFormattingLastRow<TSelf>(TSelf wordTable, bool? value = true) #

Sets WordTable.ConditionalFormattingLastRow: Specifies that the last row conditional formatting shall be applied to the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool? = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property                      // C# fluent
wordTable.ConditionalFormattingLastRow = value;    wordTable.ConditionalFormattingLastRow(value);
public static TSelf ConditionalFormattingNoHorizontalBand<TSelf>(TSelf wordTable, bool? value = true) #

Sets WordTable.ConditionalFormattingNoHorizontalBand: Specifies that the horizontal banding conditional formatting shall not be applied to the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool? = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property                               // C# fluent
wordTable.ConditionalFormattingNoHorizontalBand = value;    wordTable.ConditionalFormattingNoHorizontalBand(value);
public static TSelf ConditionalFormattingNoVerticalBand<TSelf>(TSelf wordTable, bool? value = true) #

Sets WordTable.ConditionalFormattingNoVerticalBand: Specifies that the vertical banding conditional formatting shall not be applied to the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool? = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property                             // C# fluent
wordTable.ConditionalFormattingNoVerticalBand = value;    wordTable.ConditionalFormattingNoVerticalBand(value);
public static TSelf Description<TSelf>(TSelf wordTable, string? value) #

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

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value string? required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property     // C# fluent
wordTable.Description = value;    wordTable.Description(value);
public static TSelf FirstRow<TSelf>(TSelf wordTable, Action<WordTableRow> configure) #

Configures WordTable.FirstRow in place: Gets the first row of the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
configure System.Action<OfficeIMO.Word.WordTableRow> required
Configures the value.

Returns

TSelf The same instance.
public static TSelf FitText<TSelf>(TSelf wordTable, bool value = true) #

Sets WordTable.FitText: Gets or sets whether text is compressed to fit within all cells of the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
wordTable.FitText = value;       wordTable.FitText(value);
public static TSelf FixedWidth<TSelf>(TSelf wordTable, int percentage) #

Sets the table to Fixed Width with the specified percentage

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
percentage int required
Width percentage (0-100)

Returns

TSelf The same instance.
public static TSelf LastRow<TSelf>(TSelf wordTable, Action<WordTableRow> configure) #

Configures WordTable.LastRow in place: Gets the last row of the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
configure System.Action<OfficeIMO.Word.WordTableRow> required
Configures the value.

Returns

TSelf The same instance.
public static TSelf LayoutMode<TSelf>(TSelf wordTable, 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.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value OfficeIMO.Word.WordTableLayoutMode required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
wordTable.LayoutMode = value;    wordTable.LayoutMode(value);
public static TSelf ParentTable<TSelf>(TSelf wordTable, Action<WordTable> configure) #

Configures WordTable.ParentTable in place: Gets nested table parent table if table is nested table

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
configure System.Action<OfficeIMO.Word.WordTable> required
Configures the value.

Returns

TSelf The same instance.
public static TSelf Position<TSelf>(TSelf wordTable, Action<WordTablePosition> configure) #

Configures WordTable.Position in place: Provides positioning information for the table within the document.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
configure System.Action<OfficeIMO.Word.WordTablePosition> required
Configures the value.

Returns

TSelf The same instance.
public static TSelf RepeatAsHeaderRowAtTheTopOfEachPage<TSelf>(TSelf wordTable, bool value = true) #

Sets WordTable.RepeatAsHeaderRowAtTheTopOfEachPage: Allow Header to repeat on each page This applies to only header of the table (first row)

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property                             // C# fluent
wordTable.RepeatAsHeaderRowAtTheTopOfEachPage = value;    wordTable.RepeatAsHeaderRowAtTheTopOfEachPage(value);
public static TSelf RepeatHeaderRowAtTheTopOfEachPage<TSelf>(TSelf wordTable, 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.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property                           // C# fluent
wordTable.RepeatHeaderRowAtTheTopOfEachPage = value;    wordTable.RepeatHeaderRowAtTheTopOfEachPage(value);
public static TSelf StyleId<TSelf>(TSelf wordTable, string styleId) #

Applies a table style defined in the document.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
styleId string required
Identifier of the table style to apply.

Returns

TSelf The same instance.
Style``1 2 overloads
public static TSelf Style<TSelf>(TSelf wordTable, WordStyle style) #

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

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
style OfficeIMO.Word.WordStyle required
A table style from WordDocument.Styles.

Returns

TSelf The same instance.
public static TSelf Style<TSelf>(TSelf wordTable, 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.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value OfficeIMO.Word.WordTableStyle? required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
wordTable.Style = value;         wordTable.Style(value);
public static TSelf Title<TSelf>(TSelf wordTable, string? value) #

Sets WordTable.Title: Gets or sets a Title/Caption to a Table

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value string? required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
wordTable.Title = value;         wordTable.Title(value);
public static TSelf WidthPercentage<TSelf>(TSelf wordTable, int percentage) #

Sets the table width to a percentage of the window width

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
percentage int required
Width percentage (0-100)

Returns

TSelf The same instance.
public static TSelf Width<TSelf>(TSelf wordTable, WordTableWidth? value) #

Sets WordTable.Width: Gets or sets the directly authored preferred width. Null removes tblW and preserves the grid.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value OfficeIMO.Word.WordTableWidth? required
The value.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
wordTable.Width = value;         wordTable.Width(value);
public static TSelf WrapText<TSelf>(TSelf wordTable, bool value = true) #

Sets WordTable.WrapText: Gets or sets whether text wraps within all cells of the table.

Type Parameters

TSelf

Parameters

wordTable TSelf required
The instance.
value bool = true optional
The value; true when omitted.

Returns

TSelf The same instance.

Examples

// C# initializer or property    // C# fluent
wordTable.WrapText = value;      wordTable.WrapText(value);