Word.CloseBehavior enum
Specifies the close behavior for Document.close
.
TypeScript
// 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);
});
save = "Save" | Saves the changes before closing the document. |
skipSave = "SkipSave" | Discard the possible changes when closing the document. |
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Office Add-ins feedback
Office Add-ins is an open source project. Select a link to provide feedback: