Server side docx generation RRS feed

  • Question

  • Hello,

    The project i'm currently working on will be able to generate document from document template.

    These documents are specifications for european procurement.

    So according to the characteristics of the procurement, the user choose a specifications template document.

    Next, starting from the template, the application must generate the specifications doc with data coming from a database.

    My question is: what is the best approach to realize this?

    Some data will be simple text to insert in the template but others will be repeating data (for example a list of site concerned by the procurement)

    Thanks a lot for your help

    Tuesday, January 29, 2013 6:37 PM


  • As this is to be server-side, you really have only one choice: working with the Word Open XML file format. This means the Word application does not have to be installed or available for document generation. All you require are the standard Packaging and XML Namespaces of the .NET Framework (or any programming language with a similar set of tools). The Open XML SDK is also available and "abstracts" the work so that you can program with more familiar objects, properties and methods.

    You'll find more about the file formats and how to work with them at

    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, January 30, 2013 7:14 AM