Inserting image into Word table cell

Hello,

how can I insert image into table cell in Word?

Thank you very much for help.

Lukas

Hi Lukas,

Thanks for your inquiry. Please use following cod example to achieve your requirements. Please read following documentation links for your kind reference. Hope this helps you.
https://docs.aspose.com/words/java/navigation-with-cursor/
https://docs.aspose.com/words/java/use-documentbuilder-to-insert-document-elements/

Document doc = new Document(MyDir + "in.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
// insert image in first cell of table
builder.moveToCell(0, 0, 0, 0);
builder.insertImage("http://www.aspose.com/images/aspose-logo.gif");
Table table = (Table)doc.getChild(NodeType.TABLE, 0, true);
// second approach to insert image
// Insert image in second cell of first row
Cell cell = table.getFirstRow().getCells().get(1);
builder.moveTo(cell.getFirstParagraph());
builder.insertImage("http://www.aspose.com/images/aspose-logo.gif");
doc.save(MyDir + "Out.docx");