Word.ListFormatCountNumberedItemsOptions interface
Representa opções para contar itens numerados num intervalo.
Comentários
[ Conjunto de API: WordApiDesktop 1.3 ]
Exemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/20-lists/format-list-range.yaml
// Counts only the level-2 (sub-level) numbered paragraphs in the body range.
await Word.run(async (context) => {
const bodyRange: Word.Range = context.document.body.getRange();
const listFormat: Word.ListFormat = bodyRange.listFormat;
const options: Word.ListFormatCountNumberedItemsOptions = {
level: 2,
numberType: Word.NumberType.paragraph,
};
const count: OfficeExtension.ClientResult<number> = listFormat.countNumberedItems(options);
await context.sync();
console.log(`Level-2 item count: ${count.value}`);
});
Propriedades
| level | Se for fornecido, especifica o nível a contar. O valor padrão é 1. |
| number |
Se for fornecido, especifica o tipo de número a contar. O valor predefinido é |
Detalhes da propriedade
level
Se for fornecido, especifica o nível a contar. O valor padrão é 1.
level?: number;
Valor da propriedade
number
Comentários
numberType
Se for fornecido, especifica o tipo de número a contar. O valor predefinido é paragraph.
numberType?: Word.NumberType | "Paragraph" | "ListNum" | "AllNumbers";
Valor da propriedade
Word.NumberType | "Paragraph" | "ListNum" | "AllNumbers"