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.
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.
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.
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?