can you please provide a working blazor server app that will do mailMerge for Multiple images (e.g. by providing a list with filepaths of jpegs) to it?
the code which is provided on the link below does not workat the point (args.Image = Image.FromFile(ProductFileName);)
From the given details, we have found that your requirement is to perform mail merge for multiple images using MergeImageField event in Blazor Server App.
We have prepared the sample application in Blazor Server App to achieve your requirement and it can be downloaded from the below attachment.
Please refer our UG documentation link to know how to create Word document in Blazor Server App,
If this post is helpful, please consider accepting it as the solution so that other members can locate it more quickly.
the sample is not as expected.
we want to perform mail merge for multiple images (the number of it may be different every time).
we should be able to mailmerge All of these image , without specifying for each image a different merge field in template.doc.
on your example there is a specific mergeField name for each image you want to replace with. can you please provided an updated example (.net 6 core, is preferable).
Daniel, we have
prepared a sample application to perform mail merge for multiple images as per
your requirement and it can be downloaded from the below attachment.
Note: Please find the template Word document and images in the “Files” folder of above sample.
We have done the following things in the sample:
1. Open the template Word document.
2. Execute mail merge.
3. Inside the MergeImageFieldEventHandler, load the image using field value.
4. Insert the picture at the current merge field index.
5. Similarly, insert the remaining pictures in the next index.
6. Set field value as empty.
7. Save the Word document.