Free Support Forum - aspose.com

How to perform Mail Merge?


#1

Hi, Support,

I have a question for Mail Merge Operation, how to work it out?
Example 1(tokens only without any field)::
In the template document ‘MyMailMerge.dotx’, there are at lease one Text Token for replacing for Merging , for example, the text tokens are like ‘name’, ‘address’,‘phone’,…
I expect the text token 'name‘ is to be replaced with ‘Mark Tween’, and ‘address’ is to be replaced with ‘Vegas Maryland 555’, and ‘phone’ is to be replaced with ‘702-781-4105’,…, when all the text tokens have been replaced, saving the replaced content as ‘Mark Tween.docx’.
Doing like this , then open ‘MyMailMerge.dotx’ again ,and the text token 'name‘ is to be replaced with ‘Mark Steven’, and ‘address’ is to be replaced with ‘Vegas Hundersen East 204’, and ‘phone’ is to be replaced with ‘702-781-3456’,…, when all the text tokens have been replaced, saving the replaced content as ‘Mark Steven.docx’.
…Doing like this until all the data records have been merged.
for this case, how to work it out by aspose.words.dll?

Example 2(using Mail merging field):
In the template document ‘MyMailMerge.dotx’, there are at lease one Merging field for Merging , for example, the Merging fields are like {name}, {address},{phone},…
I expect the field {name} is to be replaced with ‘Mark Tween’, and {address} is to be replaced with ‘Vegas Maryland 555’, and {phone} is to be replaced with ‘702-781-4105’,…, when all the merging fields have been replaced, saving the result as ‘Mark Tween.docx’.

…Doing like this until all the data records have been merged.
for this case, how to work it out by aspose.words.dll based on VB.net?

Thanks for your help!

Ducaisoft


#2

@ducaisoft

Thanks for your inquiry. Please read the following articles. The answer of your query is well explained here:
About Mail Merge
How to Execute Mail Merge
How to Use Nested Mail Merge Regions

If you still face problem, please ZIP and attach your input and expected output documents. We will then provide you more information about your query.