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

Free Support Forum - aspose.com

FontBold property does not work in a Table TextFrame

This does not work:
table.GetCell(0, 0).TextFrame.Paragraphs[0].Portions[0].FontBold = true;

Also tried this and it does not work:
TextFrame tf = table.GetCell(0, 0).TextFrame;
foreach (Paragraph p in tf.Paragraphs)
{
foreach (Portion portion in p.Portions)
{
portion.FontBold = true;
}
}


This message was posted using Page2Forum from Aspose.Slides for .NET - Documentation

Hi Gbenton,

Thanks for considering Aspose.Slides.

It would be helpful to investigate if you provide more details about the scenario. For example, if code is not working with a particular table in a presentation, provision of such presentation will be helpful for us to identify the issue. For understanding purpose, I have attached the presentation that was created as a result of the code which creates a 3 x 3 table, adds some text to the first column of the first row of the table and further sets some font properties. The code snippet is as under:

Presentation pres = new Presentation();

Slide sld = pres.GetSlideByPosition(1);

Aspose.Slides.Table tbl= sld.Shapes.AddTable(50, 50, 1500, 250, 3, 3);

TextFrame tf= tbl.GetCell(0, 0).TextFrame;

tf.Text = "Column1";

tf.Paragraphs[0].Portions[0].FontBold = true;

tf.Paragraphs[0].Portions[0].FontHeight = 10;

pres.Write("d:\\ppt\\jan\\abc.ppt");

Hope this will be helpful. In case of further inquiry / confusion, please feel free to share with us.

Best Regards

Thanks for the response. I just discovered that the FontBold property is not compatible with OpenOffice Draw v3 (the MS PowerPoint replica app).