Word.ChangeTrackingMode enum

ChangeTracking 模式。

注解

[ API 集:WordApi 1.4 ]

示例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/manage-change-tracking.yaml

// Gets the current change tracking mode.
await Word.run(async (context) => {
  const document: Word.Document = context.document;
  document.load("changeTrackingMode");
  await context.sync();

  if (document.changeTrackingMode === Word.ChangeTrackingMode.trackMineOnly) {
    console.log("Only my changes are being tracked.");
  } else if (document.changeTrackingMode === Word.ChangeTrackingMode.trackAll) {
    console.log("Everyone's changes are being tracked.");
  } else {
    console.log("No changes are being tracked.");
  }
});

字段

off = "Off"

ChangeTracking 已关闭。

trackAll = "TrackAll"

ChangeTracking 已为所有人打开。

trackMineOnly = "TrackMineOnly"

仅针对我的更改启用跟踪。