I have to create a word document in a specific format and send it as attachment to some email addresses.

I have a preview screen for the report which on approval has to be send in email. This is an ASP.NET MVC 3 application.

I am left with a few options here.

  1. I am creating the preview using html. I can convert this html into doc and send it, which would be a straight solution. But capturing the Response object's output is being a tough job.

  2. I thought of using Mail merge functionality of MS word, where I'll be filling the placeholders of the doc template. But the problem is conceptually, it doesn't appear to be mail merge.

  3. I have found someone suggesting to use RTF format and replace the placeholders with database values.

Which is the right thing to do? What's the best solution here? Is there any other option than the three listed above?

  • How are 2. and 3. different?
    – TZHX
    Sep 11, 2012 at 14:35
  • 2 is the inbuilt Mail merge feature of MS Word. 3 is all manual, find and replace of place holders in RTF file. Sep 11, 2012 at 14:52

2 Answers 2


Dealing with MS Office is always requiring a lot of tweaks and trade-offs. Did you had a chance to look at Open XML SDK?

You may easily use Open Xml SDK. It's free, you don't need any Office libraries and there are many resources on the web. This one, for example.


I've had a lot of success using SyncFusion's DocIO library. I had a scenario similar to yours. I stored a Word Template in the database, used the DocIO library to generate the final document off the template and emailed the file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.