Word.ChangeTrackingState enum
Especifique o estado do registo quando o ChangeTracking está ativado.
Comentários
[ Conjunto de API: WordApi 1.5 ]
Exemplos
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/10-content-controls/get-change-tracking-states.yaml
// Logs the current change tracking states of the content controls.
await Word.run(async (context) => {
let trackAddedArray: Word.ChangeTrackingState[] = [Word.ChangeTrackingState.added];
let trackDeletedArray: Word.ChangeTrackingState[] = [Word.ChangeTrackingState.deleted];
let trackNormalArray: Word.ChangeTrackingState[] = [Word.ChangeTrackingState.normal];
let addedContentControls = context.document.body.getContentControls().getByChangeTrackingStates(trackAddedArray);
let deletedContentControls = context.document.body
.getContentControls()
.getByChangeTrackingStates(trackDeletedArray);
let normalContentControls = context.document.body.getContentControls().getByChangeTrackingStates(trackNormalArray);
addedContentControls.load();
deletedContentControls.load();
normalContentControls.load();
await context.sync();
console.log(`Number of content controls in Added state: ${addedContentControls.items.length}`);
console.log(`Number of content controls in Deleted state: ${deletedContentControls.items.length}`);
console.log(`Number of content controls in Normal state: ${normalContentControls.items.length}`);
});
Campos
added = "Added" | |
deleted = "Deleted" | |
normal = "Normal" | |
unknown = "Unknown" |
Colaborar conosco no GitHub
A fonte deste conteúdo pode ser encontrada no GitHub, onde você também pode criar e revisar problemas e solicitações de pull. Para obter mais informações, confira o nosso guia para colaboradores.