Free Support Forum -

Auto Page numbering in Word using Aspose.Words

How can i set auto page numbering in Word using Aspose.Words? Also i want to display the page numbers in footer in the following pattern: “Page [Pagenumber] of [TotalPageNumbers]”.

You need to use DocumentBuilder for it. Here is an example:


builder.Write("Page ");

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

builder.Write(" of ");

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