Word.SaveConfiguration enum
指定保存选项。
注解
示例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/99-preview-apis/close-document-window.yaml
await Word.run(async (context) => {
// Closes the document window, prompting to save if this is a new document.
const window: Word.Window = context.document.activeWindow;
const closeOptions: Word.WindowCloseOptions = { saveChanges: Word.SaveConfiguration.promptToSaveChanges };
console.log("About to close the document window...");
window.close(closeOptions);
});
字段
| doNotSaveChanges = "DoNotSaveChanges" | 指定不保存更改。 |
| promptToSaveChanges = "PromptToSaveChanges" | 指定提示保存更改。 |
| saveChanges = "SaveChanges" | 指定保存更改。 |