# WordDocumentFluent

The fluent methods of WordDocument, generated from its public properties: A property-named method sets a property and a singular-named method adds…

Class 

`OfficeIMO.Word`

**Namespace**

`OfficeIMO.Word`

**Assembly**

`OfficeIMO.Word`

**Modifiers**

static

The fluent methods of [WordDocument](/api/word/officeimo-word-worddocument/), 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
- WordDocumentFluent

Filter members 

Show inherited

## Methods

`public static TSelf ApplicationProperties<TSelf>(TSelf wordDocument, Action<WordApplicationProperties> configure)` [#](#method-applicationproperties-action-officeimo-word-wordapplicationproperties)

Configures [WordDocument.ApplicationProperties](/api/word/officeimo-word-worddocument/) in place: Manages application related properties.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf AutoUpdateToc<TSelf>(TSelf wordDocument, bool value = true)` [#](#method-autoupdatetoc-boolean)

Sets [WordDocument.AutoUpdateToc](/api/word/officeimo-word-worddocument/): When true the table of contents is flagged to update before saving.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                         // C# fluent
new global::OfficeIMO.Word.WordDocument { AutoUpdateToc = value };    wordDocument.AutoUpdateToc(value);
```

Background``1 2 overloads

`public static TSelf Background<TSelf>(TSelf wordDocument, WordBackground value)` [#](#method-background-officeimo-word-wordbackground)

Sets [WordDocument.Background](/api/word/officeimo-word-worddocument/): Provides access to the document background settings.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**value OfficeIMO.Word.WordBackground required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                      // C# fluent
new global::OfficeIMO.Word.WordDocument { Background = value };    wordDocument.Background(value);
```

`public static TSelf Background<TSelf>(TSelf wordDocument, Action<WordBackground> configure)` [#](#method-background-action-officeimo-word-wordbackground)

Configures [WordDocument.Background](/api/word/officeimo-word-worddocument/) in place: Provides access to the document background settings.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

Borders``1 2 overloads

`public static TSelf Borders<TSelf>(TSelf wordDocument, WordBorders value)` [#](#method-borders-officeimo-word-wordborders)

Sets [WordDocument.Borders](/api/word/officeimo-word-worddocument/): Gets or sets the page borders for the first section.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**value OfficeIMO.Word.WordBorders required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                   // C# fluent
new global::OfficeIMO.Word.WordDocument { Borders = value };    wordDocument.Borders(value);
```

`public static TSelf Borders<TSelf>(TSelf wordDocument, Action<WordBorders> configure)` [#](#method-borders-action-officeimo-word-wordborders)

Configures [WordDocument.Borders](/api/word/officeimo-word-worddocument/) in place: Gets or sets the page borders for the first section.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf Charts<TSelf>(TSelf wordDocument, IEnumerable<WordChart> items)` [#](#method-charts-collections-generic-ienumerable-officeimo-word-wordchart)

Adds items to [WordDocument.Charts](/api/word/officeimo-word-worddocument/): Provides a list of the charts in the document body. [WordDocument.AllCharts](/api/word/officeimo-word-worddocument/) also lists header, footer, footnote and endnote charts.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**items System.Collections.Generic.IEnumerable<OfficeIMO.Word.WordChart> required**

The items, in order.

Returns

`TSelf` The same instance.

`public static TSelf Chart<TSelf>(TSelf wordDocument, WordChart item)` [#](#method-chart-officeimo-word-wordchart)

Adds an item to [WordDocument.Charts](/api/word/officeimo-word-worddocument/): Provides a list of the charts in the document body. [WordDocument.AllCharts](/api/word/officeimo-word-worddocument/) also lists header, footer, footnote and endnote charts.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**item OfficeIMO.Word.WordChart required**

The item.

Returns

`TSelf` The same instance.

CompatibilitySettings``1 2 overloads

`public static TSelf CompatibilitySettings<TSelf>(TSelf wordDocument, WordCompatibilitySettings value)` [#](#method-compatibilitysettings-officeimo-word-wordcompatibilitysettings)

Sets [WordDocument.CompatibilitySettings](/api/word/officeimo-word-worddocument/): Gets or sets compatibility settings for the document.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**value OfficeIMO.Word.WordCompatibilitySettings required**

The value.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                                 // C# fluent
new global::OfficeIMO.Word.WordDocument { CompatibilitySettings = value };    wordDocument.CompatibilitySettings(value);
```

`public static TSelf CompatibilitySettings<TSelf>(TSelf wordDocument, Action<WordCompatibilitySettings> configure)` [#](#method-compatibilitysettings-action-officeimo-word-wordcompatibilitysettings)

Configures [WordDocument.CompatibilitySettings](/api/word/officeimo-word-worddocument/) in place: Gets or sets compatibility settings for the document.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf CoverPageProperties<TSelf>(TSelf wordDocument, Action<WordCoverPageProperties> configure)` [#](#method-coverpageproperties-action-officeimo-word-wordcoverpageproperties)

Configures [WordDocument.CoverPageProperties](/api/word/officeimo-word-worddocument/) in place: Provides access to the cover page properties custom XML part used by built-in templates.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf EndnoteSettings<TSelf>(TSelf wordDocument, Action<WordEndnoteSettings> configure)` [#](#method-endnotesettings-action-officeimo-word-wordendnotesettings)

Configures [WordDocument.EndnoteSettings](/api/word/officeimo-word-worddocument/) in place: Gets the editable configuration of the first section's endnote configuration.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf FootnoteSettings<TSelf>(TSelf wordDocument, Action<WordFootnoteSettings> configure)` [#](#method-footnotesettings-action-officeimo-word-wordfootnotesettings)

Configures [WordDocument.FootnoteSettings](/api/word/officeimo-word-worddocument/) in place: Gets the editable configuration of the first section's footnote configuration.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf FootNotes<TSelf>(TSelf wordDocument, IEnumerable<WordFootNote> items)` [#](#method-footnotes-collections-generic-ienumerable-officeimo-word-wordfootnote)

Adds items to [WordDocument.FootNotes](/api/word/officeimo-word-worddocument/): Collection of all footnotes referenced throughout the document.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**items System.Collections.Generic.IEnumerable<OfficeIMO.Word.WordFootNote> required**

The items, in order.

Returns

`TSelf` The same instance.

`public static TSelf FootNote<TSelf>(TSelf wordDocument, WordFootNote item)` [#](#method-footnote-officeimo-word-wordfootnote)

Adds an item to [WordDocument.FootNotes](/api/word/officeimo-word-worddocument/): Collection of all footnotes referenced throughout the document.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**item OfficeIMO.Word.WordFootNote required**

The item.

Returns

`TSelf` The same instance.

`public static TSelf PageNumberSettings<TSelf>(TSelf wordDocument, Action<WordPageNumberSettings> configure)` [#](#method-pagenumbersettings-action-officeimo-word-wordpagenumbersettings)

Configures [WordDocument.PageNumberSettings](/api/word/officeimo-word-worddocument/) in place: Gets the editable configuration of the first section's page-numbering configuration.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf PageSetup<TSelf>(TSelf wordDocument, Action<WordPageSetup> configure)` [#](#method-pagesetup-action-officeimo-word-wordpagesetup)

Configures [WordDocument.PageSetup](/api/word/officeimo-word-worddocument/) in place: Gets the page size, margins, orientation and running headers and footers of the first section.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf Paragraphs<TSelf>(TSelf wordDocument, IEnumerable<WordParagraph> items)` [#](#method-paragraphs-collections-generic-ienumerable-officeimo-word-wordparagraph)

Adds items to [WordDocument.Paragraphs](/api/word/officeimo-word-worddocument/): Returns all paragraphs from every section of the document.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**items System.Collections.Generic.IEnumerable<OfficeIMO.Word.WordParagraph> required**

The items, in order.

Returns

`TSelf` The same instance.

`public static TSelf Paragraph<TSelf>(TSelf wordDocument, WordParagraph item)` [#](#method-paragraph-officeimo-word-wordparagraph)

Adds an item to [WordDocument.Paragraphs](/api/word/officeimo-word-worddocument/): Returns all paragraphs from every section of the document.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**item OfficeIMO.Word.WordParagraph required**

The item.

Returns

`TSelf` The same instance.

`public static TSelf Properties<TSelf>(TSelf wordDocument, Action<WordBuiltinDocumentProperties> configure)` [#](#method-properties-action-officeimo-word-wordbuiltindocumentproperties)

Configures [WordDocument.Properties](/api/word/officeimo-word-worddocument/) in place: Provides access to built-in document properties.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf RtlGutter<TSelf>(TSelf wordDocument, bool value = true)` [#](#method-rtlgutter-boolean)

Sets [WordDocument.RtlGutter](/api/word/officeimo-word-worddocument/): Gets or sets a value indicating whether the gutter should appear on the right for right-to-left pages in the first section.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                     // C# fluent
new global::OfficeIMO.Word.WordDocument { RtlGutter = value };    wordDocument.RtlGutter(value);
```

`public static TSelf Sections<TSelf>(TSelf wordDocument, IEnumerable<WordSection> items)` [#](#method-sections-collections-generic-ienumerable-officeimo-word-wordsection)

Adds items to [WordDocument.Sections](/api/word/officeimo-word-worddocument/): Collection of sections contained in the document.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**items System.Collections.Generic.IEnumerable<OfficeIMO.Word.WordSection> required**

The items, in order.

Returns

`TSelf` The same instance.

`public static TSelf Section<TSelf>(TSelf wordDocument, WordSection item)` [#](#method-section-officeimo-word-wordsection)

Adds an item to [WordDocument.Sections](/api/word/officeimo-word-worddocument/): Collection of sections contained in the document.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**item OfficeIMO.Word.WordSection required**

The item.

Returns

`TSelf` The same instance.

`public static TSelf Settings<TSelf>(TSelf wordDocument, Action<WordSettings> configure)` [#](#method-settings-action-officeimo-word-wordsettings)

Configures [WordDocument.Settings](/api/word/officeimo-word-worddocument/) in place: Provides access to document settings. A missing settings part is created on first use.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf TableOfContent<TSelf>(TSelf wordDocument, Action<WordTableOfContent> configure)` [#](#method-tableofcontent-action-officeimo-word-wordtableofcontent)

Configures [WordDocument.TableOfContent](/api/word/officeimo-word-worddocument/) in place: Gets the table of contents defined in the document.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf Theme<TSelf>(TSelf wordDocument, Action<WordTheme> configure)` [#](#method-theme-action-officeimo-word-wordtheme)

Configures [WordDocument.Theme](/api/word/officeimo-word-worddocument/) in place: Gets the document theme: its colour scheme and its heading and body fonts.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

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

Configures the value.

Returns

`TSelf` The same instance.

`public static TSelf TrackChanges<TSelf>(TSelf wordDocument, bool value = true)` [#](#method-trackchanges-boolean)

Sets [WordDocument.TrackChanges](/api/word/officeimo-word-worddocument/): Enable or disable tracking of all revisions, moves and formatting changes.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**value bool = true optional**

The value; true when omitted.

Returns

`TSelf` The same instance.

Examples

```csharp
// C# initializer or property                                        // C# fluent
new global::OfficeIMO.Word.WordDocument { TrackChanges = value };    wordDocument.TrackChanges(value);
```

`public static TSelf VbaProject<TSelf>(TSelf wordDocument, OfficeVbaProject project, OfficeVbaWriteOptions? options = null)` [#](#method-vbaproject-officeimo-officevbaproject-officeimo-officevbawriteoptions)

Applies a native source project while preserving Word's VBA data and requiring explicit signature removal.

Type Parameters

**TSelf**

Parameters

**wordDocument TSelf required**

The instance.

**project OfficeIMO.OfficeVbaProject required**

The value.

**options OfficeIMO.OfficeVbaWriteOptions? = null optional**

The value.

Returns

`TSelf` The same instance.

## 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?`

<!-- PowerForge markdown artifact sha256:7DE63A9CCACEE81EC56A6431D1BEB1B5ABC5D806E4986AC117F6F862351B2FDB -->
