Open utimcraig opened 4 years ago
I have the same requirement: my job requires me to produce a lot of .docx files containing {MAILMERGE}
fields.
However does it need to be a recursive mailmerge? The initial template could be marked up with simple text sequences e.g. {{field_1}}
or [[header]]
, and only the output files need proper Ctrl-F9 {MAILMERGE}
fields.
I think inserting Ctrl-F9 fields like {MAILMERGE}
might be outside the scope of this module, which is for populating those fields. Still looking for a module for doing this!
I'd like to be able to have a mail merge field in my word document template, and then merge in new mail merge fields. In other words something like this: In template:
And then be able to replace <> new merge fields like:
<>
<>
<>
<>
Or perhaps there is a better way like using a python variable to insert a mail merge field?
Expected Behavior
I'd like to be able to insert new mail merge fields into a word document, to make a new template that would then later be subjected to a second, standard mail merge from an excel/csv file.
Current Behavior
It's unclear to me how I can insert a mail merge field into a template using the package
Possible Solution
This could jut be an education problem for myself, but I searched around and couldn't find an answer
Context
I have to generate a lot of word document quotes for different kinds of services, so I'm trying to automate the setting up of a template, which then needs to be updated for each customer with different numbers of activities each time. These activities then have their own titles, descriptions, timelines, etc.
So what I want to have is the following flow: Start: Base Template -> modified template with mail merge fields -> final merge using data from excel that contains descriptions, titles, etc
Your Environment
I'm using windows and either stable version of python