Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordPageSetup

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Source revision
e163ccb36643 with working tree changes
Modifiers
sealed

Page size, margins, orientation and running headers and footers of one section.

Inheritance

  • object
  • WordPageSetup

Remarks

The setup is a view over the section's properties; it holds no state of its own. WordPageSetup.Header, WordPageSetup.Footer and their first-page and even-page variants create the requested story when it is missing. Use WordPageSetup.GetHeader and WordPageSetup.GetFooter to inspect a story without creating it.

Usage

Explore 2 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 2

Methods

public WordFooter? GetFooter(WordHeaderFooterType type) #

Returns the section's own footer of the requested type, or null when the section has none. Never creates a footer and does not resolve footers inherited from earlier sections.

Parameters

type OfficeIMO.Word.WordHeaderFooterType required

Returns

WordFooter?
public WordHeader? GetHeader(WordHeaderFooterType type) #

Returns the section's own header of the requested type, or null when the section has none. Never creates a header and does not resolve headers inherited from earlier sections.

Parameters

type OfficeIMO.Word.WordHeaderFooterType required

Returns

WordHeader?

Properties

public WordPageSizes Size { get; } #

Gets the page size settings of the section.

public WordMargins Margins { get; } #

Gets the page margins of the section.

public OfficePageOrientation Orientation { get; set; } #

Gets or sets the page orientation of the section.

public bool DifferentFirstPage { get; set; } #

Gets or sets whether the first page of the section uses its own header and footer. Setting the value to true also creates the first-page header and footer when they are missing.

public bool DifferentOddAndEvenPages { get; set; } #

Gets whether this section has an explicit or inherited even-page header or footer while the document-wide odd/even setting is enabled. Setting the value to true creates even-page references for this section and enables that setting; setting it to false disables the document-wide setting.

public WordHeader Header { get; } #

Gets the default header of the section, creating the default header and footer when missing.

public WordHeader FirstPageHeader { get; } #

Gets the first-page header of the section. When it is missing, this enables WordPageSetup.DifferentFirstPage, which creates the first-page header and footer.

public WordHeader EvenPageHeader { get; } #

Gets the even-page header of the section. When it is missing, this enables WordPageSetup.DifferentOddAndEvenPages, which creates the even-page header and footer and turns on the document-wide odd/even setting.

public WordFooter FirstPageFooter { get; } #

Gets the first-page footer of the section. When it is missing, this enables WordPageSetup.DifferentFirstPage, which creates the first-page header and footer.

public WordFooter EvenPageFooter { get; } #

Gets the even-page footer of the section. When it is missing, this enables WordPageSetup.DifferentOddAndEvenPages, which creates the even-page header and footer and turns on the document-wide odd/even setting.