Hi,
I used the sample from https://docs.aspose.com/words/net/types-of-mail-merge-operations/ to write approximately the following lines of code in order to accomplish an Image: merge into a Word document.
FileStream fs = new FileStream(@"c:\myfilename.jpg", FileMode.Open);
byte[] myByteArray = new byte[fs.Length];
fs.Read(myByteArray, 0, (int)fs.Length);
fs.Close();
m_wordDoc.MailMerge.Execute( new string[] { "Company.FormsLogo@G" }, new object[] { myByteArray });
The merge works and I do get an “image” in my word document but about 90% of the image is white and the very bottom strip shows a tiny sliver of the image. When I copy the image out of MS Word and into MS Paint the image shows up just fine so it appears that the information is somehow in the image.
The image is not anything too complex. This image will do: http://www.gotropics.com/images/main_page_header_animated.jpg
I am attaching my doc file.
I am using the evaluation version of Aspose 6.0.1.0.
This message was posted using Page2Forum (attachment) from Execute Simple Mail Merge - Aspose.Words for .NET and Java