Word.CompareTarget enum

Указывает целевой документ, в котором будут отображаться различия в сравнения документов.

Комментарии

Набор API: WordApiDesktop 1.1

Используется

Примеры

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

// Compares the current document with a specified external document.
await Word.run(async (context) => {
  // Absolute path of an online or local document.
  const filePath = (document.getElementById("filePath") as HTMLInputElement).value;
  // Options that configure the compare operation.
  const options: Word.DocumentCompareOptions = {
    compareTarget: Word.CompareTarget.compareTargetCurrent,
    detectFormatChanges: false
    // Other options you choose...
    };
  context.document.compare(filePath, options);

  await context.sync();

  console.log("Differences shown in the current document.");
});

Поля

compareTargetCurrent = "CompareTargetCurrent"

Различия в сравнении Places в текущем документе.

compareTargetNew = "CompareTargetNew"

Различия в сравнении Places в новом документе.

compareTargetSelected = "CompareTargetSelected"

Различия в сравнении Places в целевом документе.