How to change the Fonat name and size of the page number in footer (Aspose.Words)

Hi,

Pls guide me to change the Fonat name and size of the page number in footer (Aspose.Words)

Regards,

I.Prabhaharan.

Do you want to change font properties of a page number field already existing in the document?

Hi,

I am newly including page number in word document on the fly. That should be "Times New Roman" with size 10.

Regards,

I.Prabhaharan.

Try the following code snippet:

builder.MoveToHeaderFooter(HeaderFooterType.FooterPrimary);

builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;

builder.Font.Size = 10;

builder.Font.Name = "Times New Roman";

builder.Write("Page ");

builder.InsertField("PAGE", "");

builder.Write(" of ");

builder.InsertField("NUMPAGES", "");