I want to generate a word document (.docx) file, which is based on a template could be a word template or that the text can be stored in code.
Now the document generated should be based on the Input provided by the user using an ASP.net Web Form with Text Boxes to input the values.
These values will be taken in and placed in placeholder positions in the word template.
- How can i use a word template in an ASP.net web project?
- How can i take the values from the ASP.net webform and pass it to the word template, fill in the placeholder with the text and then generate the word document?
I have seen some examples where the text to be generated is created as HTML and then the file exported is given filetype msword to save as a word file. But in this case i wonder, how can i give page numbers and other header or footer values to the generated document.
So if i can use a word template, to just fill in the values the user wants and then generate the final document, then that's great.
Is there anything new to do this in Visual Studio 2012? I am trying to do this using C#.