2 years ago. I have implemented a small tool which it can generate MS word document with dynamically data from SQL server database to replace some wordings from original MS word document. This tool was for an existed ASP.NET web application. The user had to output lots of MS world document or PDF document everyday, but most of document have the same template, the user need to change some data fields due to the template document and output real MS word document due to real data from database.
The most best solution is using MS word 2003’s XML feature. Using word XML feature, we can convert the word file to several format file such as .doc, .xml, .pdf..
I learnt something from an article which posted on Microsoft website, Please read here for detail.