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

Free Support Forum - aspose.com

Edit Shape Settings > Format > AutoShape > Picture > TextBox using C# .NET | Set TextBox Inner Bottom Margin in Word Document

I want to change Top and Bottom values in shape’s menu “Format AutoShape/Picture -> TextBox”. How can I do it from aspose.word?Image.zip (8.2 KB)


Please check Internal Margin Bottom, InternalMarginLeft, InternalMarginRight and InternalMarginTop properties of Shape -> TextBox class. Sample usage is as follows:

Document doc = new Document("C:\\Temp\\in.docx");

Shape textBox = (Shape)doc.GetChildNodes(NodeType.Shape, true)[0];
textBox.TextBox.InternalMarginTop = 18;
textBox.TextBox.InternalMarginBottom = 18;
textBox.TextBox.InternalMarginLeft = 18;
textBox.TextBox.InternalMarginRight = 18;

1 Like

Yes! It’s works! Thank you very much.