Dear Connor Shore
Thank you for reaching out to Microsoft Q&A, with your question about the DOCX output from our Windward template.
To address your concern, you're correct that field codes (like SEQ for numbering) themselves don't create new paragraphs; they only substitute text within existing runs. However, in the rendered result DOCX showing 3 separate paragraphs, this is likely due to how our AutoTag engine processes loops in the template. Specifically:
- In the original template, a single
<w:p>(paragraph) might contain a<<forEach>>loop tag that spans multiple runs. - When the template is processed with data (e.g., a dataset with 3 items), the engine dynamically replicates the entire XML region, including inserting new
<w:p>elements, for each iteration. This expands what appeared as one paragraph in the template into multiple distinct paragraphs in the output.
If you're inspecting the result DOCX's document.xml (not the template), you should see exactly 3 <w:p> tags within the <w:body>, each containing its own set of runs and field codes. If it still looks like a single paragraph to you, it could be a viewing issue in your XML editor, try searching for <w:p> tags or using a tool like the Open XML SDK Productivity Tool for better visualization.
For reference, here's a simplified example of what the output XML might look like after processing:
<w:body>
<w:p> <!-- Paragraph 1 -->
<w:r><w:t>Item 1 text</w:t></w:r>
<w:r><w:fldChar w:fldCharType="begin"/></w:r>
<w:r><w:instrText>SEQ mylist</w:instrText></w:r>
<w:r><w:fldChar w:fldCharType="end"/></w:r>
</w:p>
<w:p> <!-- Paragraph 2 -->
<!-- Similar structure for Item 2 -->
</w:p>
<w:p> <!-- Paragraph 3 -->
<!-- Similar structure for Item 3 -->
</w:p>
</w:body>
If this doesn't match what you're seeing, could you share a snippet of the document.xml from the result file? I'd be happy assist further
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.