Word.ChangeTrackingState enum
Especifique el estado de la pista cuando ChangeTracking esté activado.
Comentarios
[ Conjunto de API: WordApi 1.5 ]
Ejemplos
// 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 con nosotros en GitHub
El origen de este contenido se puede encontrar en GitHub, donde también puede crear y revisar problemas y solicitudes de incorporación de cambios. Para más información, consulte nuestra guía para colaboradores.