python-docx-template icon indicating copy to clipboard operation
python-docx-template copied to clipboard

Shapes in a for loop

Open PaulTerrasi opened this issue 5 years ago • 1 comments

If the template document has a shape or text box in a for loop, whether it is inline or not, the rendered document will appear as corrupted. Word seems to be able to repair the document, and the shape is duplicated by the loop as expected once that happens.

I have only tested this on Word v16.42 for Mac OS, in case this happens to be specific to certain versions of Word.

PaulTerrasi avatar Nov 13 '20 14:11 PaulTerrasi

I think the reason is that for-loops create duplicate object IDs. There is no plan to renumber such objects in docxtpl. Tagging this issue as enhancement.

elapouya avatar Nov 16 '20 07:11 elapouya