Share via


Word.FieldKind enum

Represents the art of field. Gibt an, wie das Feld in Bezug auf die Aktualisierung funktioniert.

Hinweise

[ API-Satz: WordApi 1.5 ]

Beispiele

// 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);
  }
});

Felder

cold = "Cold"

Stellt dar, dass das Feld kein Ergebnis hat.

hot = "Hot"

Stellt dar, dass das Feld jedes Mal automatisch aktualisiert wird, wenn es angezeigt wird oder jedes Mal, wenn die Seite neu formatiert wird, aber auch manuell aktualisiert werden kann.

none = "None"

Stellt dar, dass das Feld ungültig ist. Beispielsweise ein Feldzeichenpaar, in dem nichts enthalten ist.

warm = "Warm"

Stellt dar, dass das Feld automatisch aktualisiert wird, wenn sich die Quelle ändert oder das Feld manuell aktualisiert werden kann.