We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Insert image into table object

I have a Aspose.Words.Tables.Table object which clone from a document:

Table modelTable = (Table)srcDoc.GetChild(NodeType.Table, 3, true).Clone(true);

How can I insert an image into a cell of this table?
(e.g. modelTable.Rows[0].Cells[0] )


Hi Sunny,

Thanks for your inquiry. Please use following code snippet to achieve your requirements. Hope this helps you.

Table modelTable = (Table)srcDoc.GetChild(NodeType.Table, 3, true).Clone(true);

Shape shape = new Shape(doc, ShapeType.Image);

shape.ImageData.SetImage(MyDir + "in.jpg");


Moreover, we suggest you please read following documentation links and let us know if you have any more queries.
Moving the Cursor
Inserting an Image