Word.ListLevelType enum
注釈
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/organize-list.yaml
// Gets information about the first list in the document.
await Word.run(async (context) => {
const lists: Word.ListCollection = context.document.body.lists;
lists.load("items");
await context.sync();
if (lists.items.length === 0) {
console.warn("There are no lists in this document.");
return;
}
// Get the first list.
const list: Word.List = lists.getFirst();
list.load("levelTypes,levelExistences");
await context.sync();
const levelTypes = list.levelTypes;
console.log("Level types of the first list:");
for (let i = 0; i < levelTypes.length; i++) {
console.log(`- Level ${i + 1} (index ${i}): ${levelTypes[i]}`);
}
const levelExistences = list.levelExistences;
console.log("Level existences of the first list:");
for (let i = 0; i < levelExistences.length; i++) {
console.log(`- Level ${i + 1} (index ${i}): ${levelExistences[i]}`);
}
});
フィールド
bullet = "Bullet" | |
number = "Number" | |
picture = "Picture" |
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Office Add-ins