I’m having a breaking bug in the Aspose.Slides.TextFrame.FitTextToShape() -function. I’m trying to make a simple rectangle to the PowerPoint slide, put some text in it and then make the text to fit inside the rectangle.
I’ using the version 6.6.0.0 of the Aspose.Slides for .NET 4.0 component.
the code is as simple as:
Dim objSlide As AsposeSlides.Slide = pres.Slides(pres.Slides.Count - 1)
Dim tshape As AsposeSlides.Rectangle = objSlide.Shapes.AddRectangle(1694, 1017, 1374, 104)
tshape.AddTextFrame(String.Empty)
With tshape.TextFrame
.Text = “Long long long longlong long long text”
.FitTextToShape()
End With
The error message is:
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Parameter name: index
I’ve got the “fit text to place holder” -functionality working sometime before, but I was back then using another version of the dll.
Could you please help me to get the functionality working.