Word.FieldKind enum
Represents the kind of field. Indicates how the field works in relation to updating.
Remarks
Examples
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-fields.yaml
// Gets the first field in the document.
await Word.run(async (context) => {
const field = context.document.body.fields.getFirstOrNullObject();
field.load(["code", "result", "locked", "type", "data", "kind"]);
await context.sync();
if (field.isNullObject) {
console.log("This document has no fields.");
} else {
console.log("Code of first field: " + field.code, "Result of first field: " + JSON.stringify(field.result), "Type of first field: " + field.type, "Is the first field locked? " + field.locked, "Kind of the first field: " + field.kind);
}
});
Fields
cold = "Cold" | Represents that the field doesn't have a result. |
hot = "Hot" | Represents that the field is automatically updated each time it's displayed or each time the page is reformatted, but which can also be manually updated. |
none = "None" | Represents that the field is invalid. For example, a pair of field characters with nothing inside. |
warm = "Warm" | Represents that the field is automatically updated when the source changes or the field can be manually updated. |
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.
Comentarios
https://aka.ms/ContentUserFeedback.
Próximamente: A lo largo de 2024 iremos eliminando gradualmente GitHub Issues como mecanismo de comentarios sobre el contenido y lo sustituiremos por un nuevo sistema de comentarios. Para más información, vea:Enviar y ver comentarios de