Word.ApplyQuickStyleSet enum
Specifies which Quick Style set to apply to the document.
Remarks
Used by
Examples
// 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.");
});
Fields
| sessionStart = "SessionStart" | Resets the Quick Style to the style set in use when the document was opened. |
| template = "Template" | Resets the Quick Style to the style set from the template, if any. |