We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Multiples Images in mail merge

Thread ID:

Created:

Updated:

Platform:

Replies:

127850 Dec 13,2016 06:00 PM UTC Jan 2,2017 07:29 AM UTC ASP.NET MVC 3
loading
Tags: DocIO
jaime
Asked On December 13, 2016 06:00 PM UTC

Hi I have a doubt, How I can use this
document.MailMerge.MergeImageField += new MergeImageFieldEventHandler(MergeField_ProductImage);

but with multiple {MERGEFIELD Image:barcode \*MERGEFORMAT} in my mail merge document, because just read the first image

Thanks in advance

Sethumanikkam Yogendran [Syncfusion]
Replied On December 14, 2016 08:08 AM UTC

Hi Jaime,

Thank you for contacting Syncfusion support.

DocIO provides support to merge multiple images for multiple merge fields. Each merge field can be replaced with different image. Please find the following UG documentation link for merging multiple images.

UG documentation link:
https://help.syncfusion.com/file-formats/docio/working-with-mailmerge
https://help.syncfusion.com/file-formats/docio/working-with-mailmerge#event-support-for-mail-merge

Online sample link:
http://mvc.syncfusion.com/demos/web/docio/employeereport

On analyzing further on your requirement, we suspect that the image name is not modified when each mail merge event is triggered based on the merge field and so you may get the same image for all the merge fields. The merge field value should match the image name to get correct results. Please find the following code snippets or your reference.
 
private void MergeField_ProductImage(object sender, MergeImageFieldEventArgs args) 
{ 
    // Get the image from disk during Merge. 
    if (args.FieldName == "ProductImage") 
    { 
        string ProductFileName = args.FieldValue.ToString(); 
        args.Image = Image.FromFile(Path.Combine(@"..\..\..\..\..\..\..\..\Common\images\DocIO\", ProductFileName)); 
    } 
} 

If we misunderstood any of your requirement, then please elaborate your exact requirement with the code snippets used, expected output document and screenshot. Thereby we will analyze further and update you the appropriate details at the earliest.

Please let us know if you have any other questions.

Thanks,
Sethumanikkam.Y


jaime
Replied On December 30, 2016 11:49 PM UTC

Thanks for your reply, I have an image overlapping with another image that was the reason because my mail merge didn't works

Thanks for your support

Vijay Ramachandran [Syncfusion]
Replied On January 2, 2017 07:29 AM UTC

Hi Jaime,

Thank you for your update.

We are unable to understand your exact requirement or issue you are facing with the given details. So kindly provide us the following details, thereby we will analyze further and update you the appropriate solution at the earliest.

   1. Working scenario along with sample or code snippet used at your end.
   2. Input template document, images used.
   3. Data set used.
   4. Expected output screen shot.

Let us know if you have any concern.

Regards,
Vijay R


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;