Page tree
Skip to end of metadata
Go to start of metadata

Intro

This is a basic demo that inserts data into a template document that has two merge fields.

Enter values into the text boxes below and click the button.  The values will be inserted into the template document by WordTemplate and streamed back to you for viewing in MSWord.

If you are just learning WordTemplate, this demo is a good place to start looking at the code.  The general sequence of handling a WordTemplate document is as follows:

  1. Create an instance of WordTemplate
  2. Open the template document
  3. Set one or more document data sources or repeat blocks
  4. Call the WordTemplate.Process() method to pull in the data
  5. Save the document either to disk, or to a response stream to the client browser.

Code

 

 Downloads

  • No labels