title: How can i generate a word document docx with existing text as in a template, but fill in value thru a asp.net web form?
body: <p>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. </p>
  
  <p>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.</p>
  
  <p>These values will be taken in and placed in placeholder positions in the word template. </p>
  
  <ol>
  <li>How can i use a word template in an ASP.net web project?</li>
  <li>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?</li>
  </ol>
  
  <p>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. </p>
  
  <p>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.</p>
  
  <p>Is there anything new to do this in Visual Studio 2012? I am trying to do this using C#.</p>