Forum Discussion
OneNote Interop API UpdatePageContent changes lastModifiedTime of unmodified child elements
You are changing an Outline by adding an OE, but UpdatePageContent refreshes lastModifiedTime on the Outline’s child OEs, erasing the per-author timing you expected to preserve. Microsoft documents the page-level object as the update unit: only changed outlines, images, or ink must be submitted, but it does not guarantee that EditedByAttributes on descendants remain unchanged when their parent Outline is rewritten. The expected-last-modified parameter prevents overwriting a page changed since it was read; it does not preserve child timestamps. force=true controls handling of unknown data, not auditing metadata. The workaround is to avoid round-tripping an Outline containing audited siblings. Add new content as a separate page-level Outline where layout permits, or store author/time data in your own metadata. Reproduce the issue with minimal XML on a OneNote build and report the before/after XML, schema version, and build to Microsoft. There is no documented API switch that preserves those child timestamps
OK, understood. You're explaining how it works. This ticket is asking for an enhancement to make it work the same way the user sees when changing content in the UI. If they change one of many paragraphs in an Outline, only that paragraph's EditedByAttributes are changed; all other paragraphs in the Outline are left unchanged. Why can't the Interop API provide similar capabilities?
There's no way, using the API as it is today, to delete the single paragraph AND inject a new paragraph without disrupting the entire Outline, thereby blowing away the attributes on all sibling OEs too.