Python Forum

Full Version: Populate MS Word from Excel data
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Need to print letters to various recipients whose details I have in an excel spreadsheet. So
Name, Registration number
Barbara, 10001
Jonathan, 10002

My letter template in Word is

Dear <name>

Your registration number is <Registration number>

So how do I run a code to populate this template and print to PDF for instance? Say I have 100 entries in Excel so I need 100 new PDF files...
You could start here: python-docx. Seems you are doing a lot of converting. Why not just create your template with Python, also, what is the point of converting it to PDF?
Not to discourage you to using python but that sounds native mail merge from excel...