How to Detect Autosave in Word Online with the Word API
Question details
The user needs to know how to detect the autosave event in Word Online via the Office JavaScript API to trigger specific add-in behaviors.
- Product
- Word Online
- Device & OS
- not provided
- Scenario
- Developing an Office Add-in and attempting to execute custom code when Word Online automatically saves the active document.
- Observed behavior
- The Office JavaScript API lacks a direct autosave event for the web, and the SettingsChanged event fails because it is only supported in Windows and Mac environments.
Verify your current Office JavaScript API requirement sets. Keep in mind that web-based platforms often have different event support compared to desktop versions of Word.
Use Periodic Monitoring as a Workaround
Since a direct autosave event is unavailable, you can monitor document changes and run timed functions to simulate autosave detection.
The Office JavaScript API does not currently offer a native event to explicitly detect when Word Online performs an autosave. Furthermore, the 'SettingsChanged' event, commonly used in desktop environments, is not supported on the web version.
To bypass this limitation, developers can track document content changes and implement custom periodic saves or state checks using standard JavaScript timing methods.
In your add-in's JavaScript logic, bind an event handler to track user activity, such as listening to document changes or selection changes to know when edits are made.
Use JavaScript's setInterval() function to periodically check the state of the document or to save custom add-in data at predetermined intervals.
Execute your background tasks during these timed intervals, ensuring your add-in data is synchronized independently of Word's native built-in autosave timing.
Experience Hassle-Free Document Editing with WPS Office
If complex API restrictions and platform-specific limitations in Microsoft Word Online are slowing down your workflow, consider using WPS Office. It delivers a fast, highly compatible, and feature-rich desktop experience without the heavy restrictions of web-only APIs.
- 1. Download the software: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded installer and follow the on-screen prompts to complete the setup.
- 3. Open your documents: Launch WPS Writer to open, edit, and safely save your existing Microsoft Word documents with full format compatibility.

Frequently Asked Questions
Why doesn't the SettingsChanged event work in Word Online?
The SettingsChanged event is currently limited to Word for Windows and Word for Mac within the Office JavaScript API requirement sets. Microsoft has not extended this specific event support to the web-based version of Word.
Is there any native autosave API event planned for Word Online?
As of the current Office JavaScript API specifications, there is no direct event for detecting native autosave. Developers must rely on custom JavaScript workarounds like monitoring content changes via timers.
Does Word Online automatically save my custom add-in data?
Word Online automatically saves the core document content to the cloud. However, if your add-in relies on custom properties or external databases, you must manually ensure that your specific add-in data is synchronized using your own code logic.




