Forum Discussion
OneNote Interop API UpdatePageContent breaks Spell Checking
Your XML after UpdatePageContent matches the structure produced by OneNote’s UI, yet spelling indicators after the changed language range disappear until OneNote performs another proofing pass. The Interop API documents page content updates, but it does not promise preservation or recalculation of the editor’s live spell-check state. Replacing the changed Outline can therefore leave the stored language markup correct while the proofing cache is stale. Keep the submitted XML to the smallest changed page-level object and avoid force=true unless the page contains unknown data that must be overwritten. After updating, the safe workaround is to let the user run Spelling or change the proofing language through the UI, which triggers re-evaluation. Test the same minimal page on the latest supported OneNote build using the xs2013 schema. If reproducible, submit the before/after XML and build number to Microsoft. The published Interop interface exposes no method that forces a spell-check recomputation.
I have to be honest, this sounds like an AI reply, restating what I already wrote above. But I think the intent of your message is true and clarifying. The OneMore addin does everything you suggest - minimal page-level object updates, avoiding force=true unless absolutely necessary, etc. Essentially, you're saying, there's no programmatic solution.