Fix Word Web Add-in Prompts to Save an Unchanged Document
Question details
The user experiences an unexpected save confirmation prompt when closing an unmodified document that uses a basic Office.js web add-in.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Closing a document after initializing a simple web add-in that has not actively modified any content.
- Observed behavior
- Microsoft Word incorrectly flags the document as modified and asks the user to save changes, often requiring the close button to be clicked twice.
Verify that your document does not contain any automatically updating components, such as a DATE field, which can silently modify the document state simply by opening it.
Check for Hidden Fields or Variables
Ensure the document is not being silently modified by hidden fields or document variables updating upon opening.
Even if a web add-in is a simple 'Hello World' application, the document itself might contain elements that trigger a modification flag. Automatically updating fields or hidden variables can cause Word to think the document has been intentionally changed.
Open your Microsoft Word document and press 'Alt + F9' on your keyboard. This action toggles the display of field codes instead of field values.
Scan the document for fields such as { DATE }, { TIME }, or any custom document properties that might update automatically when the file is accessed.
If you find auto-updating fields that are unnecessary, select them and press 'Ctrl + Shift + F9' to unlink them, converting them into static text.

Report Office.js Environment Behaviors
If multiple simple add-ins cause the same issue without document changes, escalate the behavior to Microsoft.
Try WPS Office for a Seamless Document Experience
If background environment quirks and frequent unexpected save prompts are disrupting your workflow, consider using WPS Office. It provides a highly compatible, lightweight alternative to Microsoft Word that handles documents efficiently without unprompted background modifications.
- 1. Download WPS Office: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install the Software: Run the installer and follow the on-screen instructions to set up WPS Office on your computer.
- 3. Open Your Documents: Right-click your existing .docx files, select 'Open with', and choose WPS Office to enjoy a streamlined editing experience.

Frequently Asked Questions
Why does Word ask me to save changes when I haven't typed anything?
Word tracks internal changes, such as automatically updating date fields, refreshing links, or background scripts running via add-ins. Any of these background actions will mark the document as modified, prompting a save confirmation.
Should I write code in my add-in to automatically mark the document as saved?
No, this is highly discouraged. Forcing the document's 'Saved' property to True can accidentally bypass the save prompt when a user has made actual content changes, which leads to permanent data loss.
Does loading the JavaScript API itself modify the Word document?
Normally, merely initializing the Office.js API does not alter document content. However, specific environment bugs, initialization routines, or interacting with document metadata can sometimes inadvertently trigger the modification flag.




