Hi there, I have some code that looks like this, and is working well for the most part inserting a textbox into a pre-existing word document.
the problematic part is something like:
//declare doc
//declare paragraph
Shape shape = new Shape(doc, ShapeType.TextBox);
ar run = new Aspose.Words.Run(doc, text);
run.Font.Name = “Arial”;
paragraph.AppendChild(run);
shape.AppendChild(paragraph);
shape.TextBox.FitShapeToText = true;
doc.FirstSection.Body.FirstParagraph.AppendChild(shape);
//save document
and the text gets inserted where i want but instead of the textbox expanding horizontally with the text size, it expands vertically, so if the text is “hello” it looks like this:
h
e
l
l
o
instead of
hello
What am I doing wrong? Is that how FitShapeToText is expected to work?