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

Free Support Forum - aspose.com

Word consider textbox shape as Rectangle


we have created images and shapes in a word document. We read the shapes by its alternative text. We make some shapes as Textbox. All are working fine except first shape. If the first shape is textbox then the Aspose dll consider it as Rectangle. The below is the code which i am using.

var doc = new Document(fileName);
var collector = new LayoutCollector(doc);
var enumerator = new LayoutEnumerator(doc);

                foreach (Aspose.Words.Drawing.Shape img in doc.GetChildNodes(NodeType.Shape, true))
                    enumerator.Current = collector.GetEntity(img);
                    if (string.IsNullOrEmpty(img.AlternativeText) || (img.ShapeType != Aspose.Words.Drawing.ShapeType.Image && img.ShapeType != Aspose.Words.Drawing.ShapeType.Rectangle)) continue;

Scenario to test Text box.zip (35.6 KB)


For the sake of any correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-17530. We will further look into the details of this problem and will keep you updated on the status of this issue.

Any Updates on this Issue?


We have good news for you i.e. WORDSNET-17530 has now been resolved and the fix of this issue will be integrated in next release of Aspose.Words i.e. 18.11 . We will inform you via this thread as soon as 18.11 release of Aspose.Words will be published at the start of next month.

The issues you have found earlier (filed as WORDSNET-17530) have been fixed in this Aspose.Words for .NET 18.11 update and this Aspose.Words for Java 18.11 update.