# DOCX Rendering Considerations

S-Docs DOCX templates use Microsoft Word files as the document layout source.

That approach gives you Word-native formatting and editable output.

It also has a few important considerations to plan around.

### Key considerations

* DOCX layout and styling come from the uploaded Word file.
* Dynamic content only renders where valid S-Docs DOCX syntax is inserted.
* DOCX merge fields, logic blocks, and query blocks must use square brackets.
* Repeating tables must be built as Word tables.
* Changes made in Word do not apply until you re-upload the file.
* Word proofing markup can break generation.
* Some PDF-specific behaviors do not apply to DOCX output.
* Live Edit is not supported for DOCX documents.
* Test tables, images, and conditional sections with real data before rollout.

### Not currently available

These DOCX capabilities are not currently available:

* Live Edit for generated DOCX documents

### What to avoid

Avoid these patterns in DOCX templates when possible:

* fields or tags missing square brackets
* PDF-only attributes or expectations in a DOCX template
* repeating content outside a proper Word table structure
* editing a Word file locally without re-uploading it
* leaving spelling or grammar markup in the uploaded file

Simple Word-native layout is usually the safest choice.

### Word and template structure

DOCX templates are built in Microsoft Word, not in the template body.

S-Docs merges data into the uploaded `.docx` file at generation time.

That means document structure, spacing, headers, and page layout should be controlled in Word.

S-Docs logic still works in DOCX.

The wrapper changes.

Use square brackets around visible merge fields and DOCX markup blocks.

{% hint style="warning" %}
If a DOCX field or logic block prints as plain text, check the square brackets first.
{% endhint %}

### Table and repeating content considerations

DOCX related lists render inside Word tables.

Use a table with:

* a header row
* an odd row
* an even row

S-Docs uses the odd and even rows as the repeating pattern.

If the table structure is incomplete, the output can repeat incorrectly or fail to render as expected.

Subtotal or total rows also need DOCX-specific table handling when they must stay attached to the main table.

### Word editing considerations

Word can save extra XML markup that S-Docs cannot process during DOCX generation.

The most common example is spelling or grammar proofing markup.

This can surface as [errors such as](/sdocs/template-architecture/document-formats/docx-s-docs/additional-resources/docx-generation-failure-spellstart.md) `spellStart`, `gramStart`, or `gramEnd`.

{% hint style="warning" %}
Before upload, clear all red and blue proofing marks in Word.
{% endhint %}

DOCX templates also require a fresh upload after every file change.

Saving the file in Word alone does not update the template stored in S-Docs.

### Feature differences from PDF templates

DOCX output is not the same as PDF output.

Use DOCX when you want Word-native editing and formatting.

Do not expect PDF-specific behaviors to carry over.

For example:

* PDF checkbox image attributes do not apply in DOCX
* DOCX uses Word tables instead of HTML table layout
* DOCX formatting comes from Word, not CSS-driven page markup

If you need checkbox-style output in DOCX, use Unicode checkbox characters instead of PDF checkbox attributes.

### Best practice

Build DOCX templates like Word documents first.

Then layer S-Docs syntax into that structure.

Use:

* Word-native layout and formatting
* bracketed DOCX merge syntax
* Word tables for repeating rows
* real-data testing before release

Test early if your template includes:

* related list tables
* conditional sections
* embedded images
* checkbox-style output
* multilingual content

### Troubleshooting tip

When a DOCX file fails or renders incorrectly, check these first:

* missing square brackets around DOCX syntax
* Word proofing markup left in the file
* repeating content placed outside the required Word table structure
* PDF-only attributes used in a DOCX template
* a newer local file that was never re-uploaded

If the issue is isolated to one section, test that pattern in a smaller DOCX file first.

That helps confirm whether the problem is in the syntax, the Word structure, or the uploaded file state.

### Related resources

* Review [Microsoft Word (DOCX)](/sdocs/template-architecture/document-formats/docx-s-docs.md) for format guidance and build patterns.
* Review [Merge Fields With Microsoft Templates (DOCX, PPTX, XLSX)](/sdocs/template-architecture/inserting-merge-fields/merge-fields-with-microsoft-templates-docx-pptx-xlsx.md) for DOCX merge syntax.
* Review [How to: Create a Table In Microsoft Templates (DOCX, PPTX)](/sdocs/advanced-template-logic/related-lists/how-to-create-a-table-in-microsoft-templates-docx-pptx.md) for DOCX table setup.
* Review [Quick Setup: Conditional Logic With Microsoft Templates (DOCX, PPTX, XLSX)](/sdocs/advanced-template-logic/conditional-logic/quick-setup-conditional-logic-with-microsoft-templates-docx-pptx-xlsx.md) for bracketed `RENDER` syntax.
* Review [DOCX Generation Failure: SpellStart, GramStart, or GramEnd](/sdocs/template-architecture/document-formats/docx-s-docs/additional-resources/docx-generation-failure-spellstart.md) for proofing markup fixes.
* Review [Use Checkbox Symbols in DOCX Templates](/sdocs/template-architecture/document-formats/docx-s-docs/additional-resources/checkboxes-with-docx.md) for checkbox-style output.
* Review [How to Add a Subtotal Row to a DOCX Table](/sdocs/template-architecture/document-formats/docx-s-docs/additional-resources/add-a-subtotal-line-to-the-end-of-a-table-in-docx.md) for attached total rows.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sdocs.com/sdocs/template-architecture/document-formats/docx-s-docs/docx-rendering-considerations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
