Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

Word.SaveConfiguration enum

Package:
word

Specifies the save options.

Remarks

API set: WordApiDesktop 1.4

Used by

Examples

// 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);
});

Fields

doNotSaveChanges = "DoNotSaveChanges"

Specifies not to save changes.

promptToSaveChanges = "PromptToSaveChanges"

Specifies to prompt to save changes.

saveChanges = "SaveChanges"

Specifies to save changes.


Feedback

Was this page helpful?