Freigeben über


Word.BodyType enum

Stellt die Typen von Textobjekten dar.

Hinweise

[ API-Satz: WordApi 1.3 ]

Beispiele

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

Felder

endnote = "Endnote"

Endnotentext.

footer = "Footer"

Fußzeile.

footnote = "Footnote"

Fußnotentext.

header = "Header"

Kopfzeilentext.

mainDoc = "MainDoc"

Hauptdokumenttext.

noteItem = "NoteItem"

Text der Notiz, z. B. Endnote, Fußnote.

section = "Section"

Abschnittstext.

shape = "Shape"

Formkörper.

tableCell = "TableCell"

Tabellenzellentext.

unknown = "Unknown"

Unbekannter Texttyp.