Share via

Request for Word API update

Jakob Udding 0 Reputation points
2026-03-19T11:40:55.99+00:00

For the creation of an Word Add-in we would like to get the xml of all the equations in a Word document. The Word API does not provide such a command. Can the be added to the Word API.

Microsoft 365 and Office | Word | For business | Other
0 comments No comments

2 answers

Sort by: Most helpful
  1. Julie Huynh 835 Reputation points Independent Advisor
    2026-03-19T15:46:35.1633333+00:00

    Dear @Jakob Udding,

    Good day! Welcome to Microsoft Q&A forum!

    Based on your description, I understand that you’re requesting an update to the Word API so it can return the XML for all equations in a Word document, as this capability is needed for your Word Add‑in development.

    Regarding this situation, the best way to ensure your request reaches the right product teams is to submit it through the Microsoft Feedback Portal. This allows our engineering teams to review, prioritize, and consider it for future enhancements.

    User's image

    Once you have submitted your feedback, you could also send the link of the feedback here so that other users with the same query would be able to add their votes to your feedback as well.

    Please note that we are not involved in product design decisions and do not have direct access to the development roadmap, we want to assure you that your feedback has been acknowledged and is valued.  

    Thank you for your kindness and understanding!


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

    0 comments No comments

  2. Q&A Assist
    2026-03-19T11:41:20.35+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    The current Word JavaScript APIs and Office.js methods in the provided context do not expose a dedicated command to enumerate all equations in a document or directly retrieve “equation-only” XML.

    Available options from the context for working with document XML are:

    1. Use Office Open XML (OOXML) for selections
      • Office.context.document.getSelectedDataAsync with coercionType: 'ooxml' can retrieve OOXML for the current selection, and setSelectedDataAsync can insert OOXML back into the document.
      • This works at the selection level, not as a document-wide “get all equations” API. Equations would need to be selected (manually or via other logic) before calling getSelectedDataAsync.
    2. Use custom XML parts via the Word JavaScript API 1.4
      • The CustomXmlPart and CustomXmlPartCollection APIs (for example, add, getByNamespace, getCount, setXml, updateElement, updateAttribute) allow storing and manipulating custom XML parts in the document.
      • These APIs operate on custom XML parts, not on built-in equation objects, so they do not provide a direct way to query all equations.
    3. Use full-document OOXML outside the add-in
      • As described, a Word document is an OOXML package. Saving as Word XML Document or unzipping the .docx gives access to the full OOXML, where equations can be found and processed with external tools (for example, using the Open XML SDK in C#). This is outside the Word JavaScript object model and requires custom parsing.

    From the context, there is no API that:

    • Enumerates all equations in the document, or
    • Returns their OOXML in a single call.

    To request such a feature, the appropriate path is to submit feedback/feature requests through the official Microsoft feedback channels (for example, the Microsoft 365/Office Developer feedback portals). That is where Word API feature additions such as “get all equations as OOXML” would be tracked and prioritized.


    References:

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.