Word.BodyType enum
Body オブジェクトの種類を表します。
注釈
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-footnotes.yaml
// Gets the referenced note's item type and body type, which are both "Footnote".
await Word.run(async (context) => {
const footnotes: Word.NoteItemCollection = context.document.body.footnotes;
footnotes.load("items");
await context.sync();
const referenceNumber = (document.getElementById("input-reference") as HTMLInputElement).value;
const mark = (referenceNumber as number) - 1;
const item: Word.NoteItem = footnotes.items[mark];
console.log(`Note type of footnote ${referenceNumber}: ${item.type}`);
item.body.load("type");
await context.sync();
console.log(`Body type of note: ${item.body.type}`);
});
フィールド
| endnote = "Endnote" | 文末脚注本文。 |
| footer = "Footer" | フッター本文。 |
| footnote = "Footnote" | 脚注本体。 |
| header = "Header" | ヘッダー本文。 |
| mainDoc = "MainDoc" | メイン ドキュメント本文。 |
| noteItem = "NoteItem" | 注本文 (文末脚注、脚注など)。 |
| section = "Section" | セクション本文。 |
| shape = "Shape" | 図形本体。 |
| tableCell = "TableCell" | テーブル セル本文。 |
| unknown = "Unknown" | 不明な本文の種類。 |