Word.HeaderFooterType enum
表示页眉或页脚的类型。
注解
使用方
示例
// 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" | 返回节的所有页面的页眉或页脚,但排除第一页甚至页面(如果它们不同)。 |