Word.HeaderFooterType enum

注解

[ API 集:WordApi 1.1 ]

示例

// 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();
});

字段

evenPages = "EvenPages"

返回节的偶数页上的所有页眉或页脚。

firstPage = "FirstPage"

返回节的第一页上的页眉或页脚。

primary = "Primary"

返回节的所有页面上的页眉或页脚,但如果页面不同,则排除第一页甚至页。