Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordDocumentFluent

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Modifiers
static

The fluent methods of 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

Methods

public static TSelf ApplicationProperties<TSelf>(TSelf wordDocument, Action<WordApplicationProperties> configure) #

Configures WordDocument.ApplicationProperties 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) #

Sets WordDocument.AutoUpdateToc: 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

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

Sets WordDocument.Background: 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

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

Configures WordDocument.Background 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) #

Sets WordDocument.Borders: 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

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

Configures WordDocument.Borders 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) #

Adds items to WordDocument.Charts: Provides a list of the charts in the document body. WordDocument.AllCharts 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) #

Adds an item to WordDocument.Charts: Provides a list of the charts in the document body. WordDocument.AllCharts 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) #

Sets WordDocument.CompatibilitySettings: 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

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

Configures WordDocument.CompatibilitySettings 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) #

Configures WordDocument.CoverPageProperties 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) #

Configures WordDocument.EndnoteSettings 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) #

Configures WordDocument.FootnoteSettings 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) #

Adds items to WordDocument.FootNotes: 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) #

Adds an item to WordDocument.FootNotes: 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) #

Configures WordDocument.PageNumberSettings 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) #

Configures WordDocument.PageSetup 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) #

Adds items to WordDocument.Paragraphs: 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) #

Adds an item to WordDocument.Paragraphs: 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) #

Configures WordDocument.Properties 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) #

Sets WordDocument.RtlGutter: 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

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

Adds items to WordDocument.Sections: 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) #

Adds an item to WordDocument.Sections: 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) #

Configures WordDocument.Settings 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) #

Configures WordDocument.TableOfContent 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) #

Configures WordDocument.Theme 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) #

Sets WordDocument.TrackChanges: 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

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

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.