- Home
- Forum
- ASP.NET MVC
- Multiples Images in mail merge
Multiples Images in mail merge
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
SIGN IN To post a reply.
3 Replies
SY
Sethumanikkam Yogendran
Syncfusion Team
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.
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
JA
jaime
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
Thanks for your support
VR
Vijay Ramachandran
Syncfusion Team
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
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
SIGN IN To post a reply.
- 3 Replies
- 3 Participants
-
JA jaime
- Dec 13, 2016 06:00 PM UTC
- Jan 2, 2017 07:29 AM UTC