Free Support Forum -

Image Merge using Image Merge Field from URL


I just read about the image merge field here: However, I have a question. I have images coming in from URLs as stream. I have Image merge fields in my template (Image:xxx and Image:yyy). My question is how would I use the method described in the above link to lets say replace xxx by a particular image ( and yyy ( by a different image? What do I need to do to make sure the right images are replaced?

This message was posted using Page2Forum from How-to: Insert Images from a Database - Aspose.Words for .NET and Java


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

Thanks for your request. If you have Image:xxx and Image:yyy merge fields in your document and need to insert into xxx field and into yyy field, you can just use the following code:

Document doc = new Document(@"Test001\in.doc");

doc.MailMerge.Execute(new string[] { "xxx", "yyy" }, new object[] { "", "" });


Hope this helps.

Best regards.