Updated regex pattern to make '{% vm %}' replace a two-step process:
- Search for <w:tc>...{% vm %}...</w:tc>;
- Parse table cell and put jinja tags inside correct places.
6 lines
144 B
Python
6 lines
144 B
Python
from docxtpl import DocxTemplate
|
|
|
|
tpl = DocxTemplate('test_files/vertical_merge_nested.docx')
|
|
tpl.render()
|
|
tpl.save('test_files/word2016.docx')
|