Word.HeaderFooterType enum
Remarks
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/insert-header-and-footer.yaml
await Word.run(async (context) => {
context.document.sections
.getFirst()
.getHeader(Word.HeaderFooterType.primary)
.insertParagraph("This is a primary header.", "End");
await context.sync();
});
Fields
evenPages = "EvenPages" | Returns all headers or footers on even-numbered pages of a section. |
firstPage = "FirstPage" | Returns the header or footer on the first page of a section. |
primary = "Primary" | Returns the header or footer on all pages of a section, but excludes the first page or even pages if they are different. |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins