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

Insert an indefinite number of subdocuments into a Word template

Open Ysen007 opened this issue 3 years ago • 2 comments

Describe the solution you'd like

Insert an indefinite number of subdocuments into a Word template

Describe alternatives you've considered

I now have two ideas. First, create a blank page with the maximum number of subdocuments required, using tpl.new_subdoc (), and then delete the extra blank pages (with {{mySubdoc}} tags) by counting the number of subdocuments actually inserted. But I noticed that there is no function to delete the current page of Word. Second, merge multiple subdocuments, generate a new document, and insert it into the template using tpl.new_subdoc (), so that a new blank page can be created. I don't know if the above two ideas work, so I'm ready to test them out.

Ysen007 avatar Mar 10 '22 08:03 Ysen007

Can you suggest example use case for this? I don't understand what it could help with.

karolzlot avatar Jun 04 '22 05:06 karolzlot