Free Support Forum - aspose.com

Setting fonts in TextArea objects

I am taking a template slide with a TextArea and using Aspose to set the text within the TextArea from my object. The format of the text in the template object is set to a font size of 10, but when I use the following line to update the text in the TextArea, the font size is being overwritten. I can't find any way to explicitly set the font size for the text area.

Aspose.Slides.Shape tsShape = flowSlide.FindShape("SUMMARY_AREA");

tsShape.TextFrame.Text += "\n" + myObject.Name;

When you set text to TextFrame.Text property then all text formatting will be reset to default.
To save all formatting you should work directly with Paragraphs and Portions.