Thanks for your inquiry. I have tested the scenario and have not found any issue while using executeTemplate. Please check the following xml. The image file should be in folder1 at storage. Please upload the image file at storage and Execute Mail Merge Template.
<?xml version="1.0" encoding="utf-8"?>
This is the first caption !!!
This is the second caption !!!
I suggest you please download the Aspose Cloud SDK and use following code example to check the executeTemplate. I have attached the intput/output and xml file with this post for your kind reference. Hope this helps you. Please let us know if you have any more queries.
string inputFile = @"C:\temp\TestExecuteTemplate.doc";
string xml = null;
using (System.IO.StreamReader sr = new System.IO.StreamReader(@"C:\TestOrders.xml"))
xml = sr.ReadToEnd();
Aspose.Cloud.Storage.Folder folder = new Aspose.Cloud.Storage.Folder();
string fileName = Path.GetFileName(inputFile);
Aspose.Cloud.Words.MailMerge mailMerge = new Aspose.Cloud.Words.MailMerge();
mailMerge.ExecuteTemplate(fileName, xml, SaveFormat.Docx, "c:\\temp\\Output.docx");
catch (Exception ex)
And at the moment, it's just printing the name of the image in the document. There is obviously something I'm missing to get the word document to render the image.
Thanks for your inquiry. Please check the input document in my previous post.
Please specify a field name prefix like Image:MyFieldName in the document to be able to directly merge images during Mail Merge. Please check the image merge field as shown below: