次の方法で共有


Word.BodyType enum

本文オブジェクトの種類を表します。

注釈

[ API セット: WordApi 1.3 ]

// 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 = $("#input-reference").val();
  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"

不明な本文の種類。