Word.BodyType enum
注解
示例
// 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}`);
});
字段
footer = "Footer" | |
header = "Header" | |
mainDoc = "MainDoc" | |
section = "Section" | |
tableCell = "TableCell" | |
unknown = "Unknown" |
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈