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

Free Support Forum - aspose.com

Add Text Box Shape inside another Text Box in Word Document using Java | Insert Shape inside Shape

Hi,

I have an one question how to put new shape inside shape ?
I want to put another text box inside existing text box but when try to append new shape to existing it gets hooked to document instead of previous shape.
I tried it like so:
builder.moveTo(previousShape);
Shape newShape = new Shape(builder.getDocument(), ShapeType.TEXT_BOX);
builder.insertNode(newShape);

Sadly without positive result.

@aolo23,

Please ZIP and attach your expected DOCX file showing the desired output here for our reference. You can create this document by using MS Word. We will then further investigate the scenario and provide you code to achieve the same by using Aspose.Words.

1 Like

I would like to achieve the effect like in the photo below. Additionally, it would be best if the inscription “ValueInputGraph - Label” was not editable

value_graph.png (6.9 KB)

@aolo23,

Can you meet this requirement manually by using MS Word? It seems that you cannot insert text boxes inside another text box, you can only overlay one with another. As an alternative, you can insert tables into text box or into other tables.

Instead of image, please ZIP and attach your actual expected DOCX file containing the actual text box shapes here for our reference. You can try to create this document by using MS Word. Please also list the complete steps that you performed in MS Word to create the expected document on your end. We will then further investigate the scenario and provide you code to achieve the same by using Aspose.Words.