Aspose.word template creation


Could someone please provide me with information on creating a word template for aspose.word.

I have all the samples working correctly but I need to change the data place holders in the word document with my own datafields. Is this design process done in VS or MS WORD?

Kind regards, ferre010



You do this in MS Word.

You just insert mail merge fields into the document in the places you need. Simply use Insert/Field Word command, select MergeField and type field name that must match the one you later want to merge with.

If you want to create mail merge regions inside the document you need to insert mail merge fields to identify start and end of the region. Just insert a field like described above, but give it a special name such as TableStart:MyTable and TableEnd:MyTable where MyTable is the name of the DataTable you want to merge from.

You can also use Next field (also inserted in the same way) which signals to Aspose.Word to move to next record inside the data table. This is useful when creating documents such as mailing labels or invoices (invoice detail), see demo projects for this.


Thnaks a lot for the quick response.