Free Support Forum - aspose.com

Page Number and Total Pages

Hello,

we need to show page number and total pages in the word document which has narative text.

How this can be achived using Aspose.

Attached is the document for your reference.

Take a look at page 4 and suggest on how this can be achieved.

Regards,

Dwarika

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />Hello Dwarika,

Thanks for your inquiry. Please follow the link to learn how to create headers/footers using DocumentBuilder and how to insert page numbers into the header/footer:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/howto-create-headersfooters-using-documentbuilder.html

Hope this helps. Please let me know in case of any issues. I will be glad to help you.

Best regards,

Hello,


Thanks for your reply.
We are already using page numbers and total pages inside document header and footer using documentBuilder object.

Our requirement is page number and total pages which can be seen under Header and Footer section, can also be seen in report/document body.

E.g. I have a paragraph explaining technical information about .net and now i would like to say for more information visit (this needs to be calculated on fly)

I hope the above details will help in understanding our problem area.

Regards,
Dwarika

Hello

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. I think in this case you can use PAGEREF field:

http://office.microsoft.com/en-us/word/HP051861801033.aspx

Please see the following link to learn how to insert field into the document:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.documentbuilder.insertfield_overloads.html

Hope this helps.

Best regards,