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

Free Support Forum - aspose.com

Merge with SQL Server image field

Hi,

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 ?

Regards

Happy new year 2009

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

Hi

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

http://www.aspose.com/documentation/file-format-components/aspose.words-for-.net-and-java/the-mergeimagefield-event.html

Hope this helps.

Best regards.

Hi,

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 ?

Thanks

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.