, ,

I spent a day with Microsoft.Office.Word.Interop.dll and… surprisingly it hurt less than I expected. API is strange but does the job and it somehow improved over the years. I needed to support Word templates with following functionality:

  • repeatedly filling the same field e.g., CompanyName could occur multiple times (unfortunately fields/bookmarks in Word’s template must have a unique names)
  • adding rows to the existing table
  • checkboxes (easy)
  • export to PDF (again easy – Word 2007+ supports it OOTB)

Not exactly rocket science but could be a time saver: https://github.com/orient-man/WordTemplates