Word .NET > Tutorial > Fill template placeholders

The following example shows you how to generate a document from a template by replacing placeholders with data. This is the most common reporting scenario - load a template that contains placeholders such as {name}, {date} and {amount}, then replace them with values from your application or database. The Replace method accepts lists of placeholders and values so all of them are replaced in a single pass.

C# example - Replace multiple placeholders
C# example - Replace a single placeholder
VB example - Replace multiple placeholders

Need help? Ask our developers: