Free Support Forum - aspose.com

Replace the mark in the RTF text with page numbers

Hi… I have an RTF text in database and i put it to my document with function - InsertDocument(Byval insertAfterNode as Node, Byval srcDoc as Document).

I can put PageNumber into my document with - Builder.InsertField(“PAGE”, “”)
And I want ask…
How can I replace some tag in this RTF text with Page Number?
Michal

Hi

Thanks for your inquiry. If you need to replace a placeholder with a PAGE field, you can use a similar approach as suggested here to achieve this:

http://www.aspose.com/community/forums/266470/merge-field-formatting/showthread.aspx#266470

Just insert a PAGE field instead of MERGEFIELD.

Hope this helps.

Best regards,