Positioning of paragraph tags for content controls RRS feed

  • Question

  • We have an add-in that inserts Content Controls on a word document. The content control structure is such that there is a parent content control (the wrapper), which nests 4-5 child content controls.

    The open xml generated by these insertions is converted to a xml structure defined by us and vice versa (Open XML <-> different structure)

    Converting the xml structure defined by us to Open XML, requires us to understand precisely how the paragraph <p> tags are positioned in the word open xml for nested content controls.

    We’ve seen specific rules where it is stated that the <w:r> tag must have a <w:p> tag as an ancestor. Is there a list of specific rules that we can use to carry out conversion.


    Monday, May 10, 2010 2:02 PM

All replies

  • Hi Anisha Dsouza,

    Thanks for your question.

    Content Controls are represented as "w:sdt" (SdtBlock) in WordprocessingML. It has a relation with Paragraph like "SdtBlock\SdtContentBlock\Paragraph". If you need to more rules, you could search the element in "Open XML SDK Documentation" and refer to the "Child/Parent Element Tree" to see a specific relation between two elements.

    Hope this helps. If you have any question, please let me know.



    • Proposed as answer by Lu Zhang Monday, May 31, 2010 7:38 AM
    Tuesday, May 11, 2010 5:01 AM