Free Support Forum - aspose.com

Inserting Image to word file

How can I insert image to the cell of table in word file using

data.Rows.Add(new object[]{ })


This message was posted using Page2Forum from Aspose.Words for .NET - Documentation

Hi Monika,

Thanks for your request. If you need to insert an image into the document during mail merge, you have to use special syntax for merge field name. Please see the documentation for more information:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/howto-insert-images-from-a-database.html

Best regards,

Can I simply insert image to this object

object[] add_data = new object[37]

add_data[1]=??

Hi Monika,

Thanks for your request. Sure you can. You can use the same approach as I suggested here:

http://www.aspose.com/community/forums/2/318149/exporting-data-to-word-file/showthread.aspx#318149

But instead of building a table in IFieldMergingCallback, you should insert an image. You can use DocumentBuidler.InsertImage method to achieve this.

Best regards,