So I've got this dictionary
mydict = {'name': 'Theo', 'age': '39', 'gender': 'male', 'eyecolor': 'brown'}
and I use docx-mailmerge to merge this data into a word document.
template = "myworddoc.docx"
newdoc = "mergeddoc.docx"
document = MailMerge(template)
document.merge(mydict)
document.write(newdoc)
But the document created is empty. I guess it only works with kwargs??
Can I only use the merge with kwargs so
document.merge(name='Theo', age='39', gender='male', eyecolor='brown')
I really like to use a dictionary to merge the data.
Do I transform the dict to kwarg (and how do I do this) or do I use the dict?
Thank you for helping out!!