Word.ApplyQuickStyleSet enum

ドキュメントに適用するクイック スタイル セットを指定します。

注釈

API セット: WordApiDesktop 1.4

使用元

例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/28-formatting/apply-quick-style-sets.yaml

// Restores the Quick Style set that was active when the document was opened.
await Word.run(async (context) => {
  const document: Word.Document = context.document;
  const styleSet: Word.ApplyQuickStyleSet = Word.ApplyQuickStyleSet.sessionStart;

  document.applyQuickStyleSet(styleSet);
  await context.sync();

  console.log("Restored the Quick Style set from the start of the session.");
});

フィールド

sessionStart = "SessionStart"

クイック スタイルを、文書を開いたときに使用されていたスタイル セットにリセットします。

template = "Template"

テンプレートがある場合、クイック スタイルをテンプレートのスタイルセットにリセットします。