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
// Inserts a primary header by using the HeaderFooterType enum.
await Word.run(async (context) => {
const sections: Word.SectionCollection = context.document.sections;
const firstSection: Word.Section = sections.getFirst();
const headerType: Word.HeaderFooterType = Word.HeaderFooterType.primary;
const primaryHeader: Word.Body = firstSection.getHeader(headerType);
primaryHeader.insertParagraph("This is a primary header.", Word.InsertLocation.end);
await context.sync();
});
フィールド
| evenPages = "EvenPages" | セクションの偶数ページのすべてのヘッダーまたはフッターを返します。 |
| firstPage = "FirstPage" | セクションの最初のページのヘッダーまたはフッターを返します。 |
| primary = "Primary" | セクションのすべてのページのヘッダーまたはフッターを返しますが、最初のページまたは異なる場合は除外します。 |