Word.CloseBehavior enum

Specifies the close behavior for Document.close.

Remarks

[ API set: WordApi 1.5 ]

Examples

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

// Closes the document after saving.
await Word.run(async (context) => {
  context.document.close(Word.CloseBehavior.save);
});

Fields

save = "Save"

Saves the changes before closing the document.

skipSave = "SkipSave"

Discard the possible changes when closing the document.