Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

WordPageNumber

OfficeIMO.Word

Namespace
OfficeIMO.Word
Assembly
OfficeIMO.Word
Source revision
0eef6a5756b9 with working tree changes

Inserts and controls page-number elements.

Inheritance

  • object
  • WordPageNumber

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

Constructors

WordPageNumber 2 overloads
public WordPageNumber(WordDocument wordDocument, WordHeader wordHeader, WordPageNumberStyle wordPageNumberStyle) #

Initializes a new instance of WordPageNumber and appends it to the specified header.

Parameters

wordDocument OfficeIMO.Word.WordDocument required
Document where the page number will be inserted.
wordHeader OfficeIMO.Word.WordHeader required
Header that will contain the page number.
wordPageNumberStyle OfficeIMO.Word.WordPageNumberStyle required
Style applied to the page number.
public WordPageNumber(WordDocument wordDocument, WordFooter wordFooter, WordPageNumberStyle wordPageNumberStyle) #

Initializes a new instance of WordPageNumber and appends it to the specified footer.

Parameters

wordDocument OfficeIMO.Word.WordDocument required
Document where the page number will be inserted.
wordFooter OfficeIMO.Word.WordFooter required
Footer that will contain the page number.
wordPageNumberStyle OfficeIMO.Word.WordPageNumberStyle required
Style applied to the page number.

Methods

public WordParagraph AppendText(string text) #

Appends text to the last paragraph of the page number.

Parameters

text string required
Text to append.

Returns

WordParagraph The paragraph that received the text.

Properties

public WordParagraphAlignment? ParagraphAlignment { get; set; } #

Gets or sets the alignment of the page-number paragraph.

public WordParagraph Paragraph { get; } #

Gets the primary paragraph containing the page number field.

public IReadOnlyList<WordParagraph> Paragraphs { get; } #

Gets all paragraphs that make up the page number content.

public WordField? Field { get; } #

Gets the underlying field representing the page number.

public int? Number { get; } #

Gets the numeric value from the field text if available.

public string CustomFormat { get; set; } #

Gets or sets the custom format of the page number field.