Bouke/docx-mailmerge

QUESTION: Updating a document after it is written.

AnAlpaca opened this issue · 0 comments

Hi All,

It is perhaps possible to update a field after one has created a document.
I currently an using your code to help me at work in creating Product Approvals for various engineering components.
So far it has been a huge help, and I am learning Python whilst doing so (please excuse my poor knowledge).

The documents I write are generated using docx-mailmerge where the values are pulled from an Excel Spreadsheet. The spreadsheet just enables me to input all information one place, then my code uses a bit of logic to generate up 5 documents from 10 possible templates. The documents generated still requires some manual input (by me or other staff members that know nothing about coding) as each product is quite unique after which is saved, happy days.

The issue for me currently is that in some cases we will want to do a product update. I then will need to update the various product approval documents accordingly. However, the obvious problem is that updating the spreadsheet and regenerating the documents will overwrite any of the changes done after saving.

Is there a way to update the fields in these documents from a spreadsheet using docx-mailmerge, or anything out there?
Or if you can think of a simple solution to get around this (bearing in other people will use these docs).

Thanks a million