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

Free Support Forum - aspose.com

Change font size of table

hi all,


I have make a code in .NET to generate tables in word from my database.
now i have a problem the font size won’t change when i say row.cells(0).font.size = 9

do anyone know how to solve this problem.

thank you.

Hi,


Thanks for your interest in Aspose.Words. You can set Font of each Run node inside your Table object by using the code like below:

Document doc = new
Document(@“C:\Temp\in.docx”);

Table table = doc.FirstSection.Body.Tables[0];

foreach (Run run in table.GetChildNodes(NodeType.Run, true))

{

Aspose.Words.Font font = run.Font;

font.Size = 20;

font.Color = Color.Blue;

}

doc.Save(@"C:\Temp\out.docx");


I hope, this helps.

Best Regards,

Thank you.


I will test this.

Best Regards
Hi,

Sure, please let us know any time you have any further queries. We're always glad to help you.

Best Regards,