Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents

Hello World with WordTemplate

WordWriter's WordTemplate approach allows you to write data to a template file that contains merge field. The merge fields tell WordWriter where to bind specific sets of data, similar to Word's mail merge. This tutorial will show you the basics on how to dynamically insert data into a document using WordTemplate by taking custom text from a web form textbox and inserting it into a template file.

Setting up the template file

Writing the code

1. Include the SoftArtisans.OfficeWriter.WordWriter namespace in the code behind.

Csharp
1
1

using SoftArtisans.OfficeWriter.WordWriter;
Vbnet
1
1

Imports SoftArtisans.OfficeWriter.WordWriter

Final Code

Csharp
8
8
Vbnet
8
8

Downloads

You can download the code for the hello world tutorial as a Visual Studio solution.