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:
- Create an instance of WordTemplate
- Open the template document
- Set one or more document data sources or repeat blocks
- Call the WordTemplate.Process() method to pull in the data
- Save the document either to disk, or to a response stream to the client browser.