Class
WordPageNumber
OfficeIMO.Word
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
- Method WordFooter.AddPageNumber
- Method WordHeader.AddPageNumber
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
- Document where the page number will be inserted.
- wordHeader OfficeIMO.Word.WordHeader
- Header that will contain the page number.
- wordPageNumberStyle OfficeIMO.Word.WordPageNumberStyle
- 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
- Text to append.
Inherited Methods
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.