Flexible customization - Generating word document using C#
Problem - Generate a word document from information retrieved from database.

My solution - Create a word document template add fields/tags in places where values need to be inserted. The template will require tables and charts as well. Using document reflector that comes with open office xml sdk reflect on the document template and extract the w:document section and port it to C#. The rest of the logic revolves simply around finding the fields/tags, replacing them, etc. Very simple approach but not very flexible!

Challenge - I want the user to have the ability to customize the template or the generated document output. But this will not be possible if I embed the template logic in code.

Any other possibilities - I looked around at Templating using T4 and RazorEngine but could not find any concrete examples of how to create word documents using these two technologies.

Now what is the best approach?
I would really appreciate your inputs on what is the best and most flexible way to generate word documents using C#.
Flexible customization - Generating word document using C#
===

Problem - Generate a word document from information retrieved from database.

My solution - Create a word document template add fields/tags in places where values need to be inserted. The template will require tables and charts as well. Using document reflector that comes with open office xml sdk reflect on the document template and extract the w:document section and port it to C#. The rest of the logic revolves simply around finding the fields/tags, replacing them, etc. Very simple approach but not very flexible!

Challenge - I want the user to have the ability to customize the template or the generated document output. But this will not be possible if I embed the template logic in code.

Any other possibilities - I looked around at Templating using T4 and RazorEngine but could not find any concrete examples of how to create word documents using these two technologies.

Now what is the best approach?
I would really appreciate your inputs on what is the best and most flexible way to generate word documents using C#.