Word.BodyType enum
Representa os tipos de Body objetos.
Comentários
[ Conjunto de API: WordApi 1.3 ]
Exemplos
// 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}`);
});
Campos
| endnote = "Endnote" | Corpo da nota de fim. |
| footer = "Footer" | Corpo do rodapé. |
| footnote = "Footnote" | Corpo da nota de rodapé. |
| header = "Header" | Corpo do cabeçalho. |
| mainDoc = "MainDoc" | Corpo do documento principal. |
| noteItem = "NoteItem" | Corpo da nota, por exemplo, nota de fim, nota de rodapé. |
| section = "Section" | Corpo da secção. |
| shape = "Shape" | Corpo da forma. |
| tableCell = "TableCell" | Corpo da célula da tabela. |
| unknown = "Unknown" | Tipo de corpo desconhecido. |