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

Free Support Forum - aspose.com

Change the size of the Heading 1 style

Is it possible to change the size of the font in a heading style? Thanks.

Hi Marc,

Thanks for your inquiry. Please use Style.Font property as shown below to achieve your requirements. Hope this helps you. Please let us know if you have any more queries.

Document doc = new Document();

DocumentBuilder builder = new DocumentBuilder(doc);

doc.Styles[StyleIdentifier.Heading1].Font.Size = 20;

builder.ParagraphFormat.StyleIdentifier = StyleIdentifier.Heading1;

builder.Writeln("Aspose.Words");

doc.Save(MyDir + "Out.docx");

Thank you very much. That works perfectly. As ever, the support from Aspose is without equal. You guys are excellent.