We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Merge with SQL Server image field


I need to merging SQL Server data with a word template and one of this data is a image datatype field which contain a JPG image.

Can I have an code example which explain how to do that ?


Happy new year 2009

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />


Thanks for your request. Please see the following link to learn how to insert images into the document during mail merge.


Hope this helps.

Best regards.


Thanks, this is a great help.

One more thing, can you tell me what syntax should I used in the InsertField method.

For normal fields I use :

docBuilder.InsertField("MERGEFIELD myField \* MERGEFORMAT ", myField);

But for image fields ?


Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Syntax is the same but name starts with Image: . See the following code:

builder.InsertField(@"MERGEFIELD Image:myField \* MERGEFORMAT ", "«Image:myField»");

Hope this helps.

Best regards.

Thanks a lot for your support.