OneNote Interop API: Local paragraph style attributes not retained after UpdatePageContent

stemarcoh 46 Reputation points
2026-08-15T14:13:52.61+00:00

Description: When using the OneNote COM Interop API, I’ve observed that certain local paragraph style attributes are not preserved after calling UpdatePageContent. This occurs when the local style contains only font‑family and font‑size values that match the properties already defined in the referenced QuickStyleDef.

The sequence is:

  • A page contains a QuickStyleDef with specific font properties, including a color.

A paragraph references this QuickStyleDef and also includes a local style attribute that repeats only the font‑family and font‑size.

The page XML is submitted through UpdatePageContent.

When retrieving the page again using GetPageContent, the local style attribute is no longer present on that paragraph. Other elements and attributes remain unchanged.

Because the local style is no longer present, the paragraph uses only the QuickStyleDef’s formatting.

What I’m trying to understand: Is this behavior expected when a local style duplicates properties already defined in the QuickStyleDef? Or should the Interop API retain the local style attribute exactly as provided in the XML passed to UpdatePageContent?

Environment:

C# / .NET Framework 4.8

OneNote for Microsoft 365

Interop API: GetPageContent and UpdatePageContent

XMLSchema.xs2013

I can provide a minimal XML example if needed, but I’ve omitted it here to keep the post concise.

Microsoft 365 and Office | OneNote | For business | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. Demi Nguyen 1,665 Reputation points Independent Advisor
    2026-08-15T14:59:42.5166667+00:00

    Hello stemarcoh,

    Thank you for taking the time to explain the behavior in detail.

    I reviewed the available public information, but I could not find documentation that specifically confirms whether this behavior is expected by design. In particular, the current documentation does not clearly state whether OneNote should preserve the local style exactly as submitted or remove it when the same formatting is already defined elsewhere.

    Since this behavior involves how OneNote processes the page content internally after UpdatePageContent is called, confirming the exact reason would require knowledge and diagnostic capabilities beyond what is available through the community forum. I would therefore recommend opening a support request with Microsoft through the Microsoft 365 admin center: https://admin.cloud.microsoft

    Once signed in, your Microsoft 365 administrator can select Help & support, describe the issue, and choose Contact support. Microsoft documents the support-request process here: Get support - Microsoft 365 admin | Microsoft Learn

    Through a formal support request, the case can be reviewed by an engineer with the appropriate developer and product expertise. The support team can also determine whether any additional diagnostic or backend information is available to explain how OneNote handles the style attribute in this scenario.

    When submitting the request, I recommend including the OneNote version and build, a minimal XML example before calling UpdatePageContent, and the XML returned afterward by GetPageContent. This will help the assigned engineer understand and reproduce the behavior more efficiently.

    I hope this points you toward the right support channel for a more definitive answer. If you receive any additional findings from Microsoft Support, please feel free to update this thread, as the information may also be helpful to others encountering the same behavior.

    Kind regards,


    Note: Please follow the steps in documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.