Referencing Page Numbers resulting from multiple document join

I have a document packet that can be from 1 to 23 separate documents all formed and merged in Aspose. Each document has elements that are merged in from various data sources. The number and order of these documents are controlled by the user through our UI. What I am needing to do is this:

The main overview document will always be first in the list. It contains overview information of documents that can but do not necessarily appear in the packet. If a document is included in the packet, I need to get the page number it starts on, and reference that in the main overview document for that section, but I am unsure of how to retrieve this information from the other documents during the merge.

Any help would be appreciated.

Dave

Hi David,
Thanks for the inquiry. You can achieve your requirement by using bookmarks. Please try following solution and kindly correct me if there are any differences in understanding you requirements.
To create an overview document of your merged documents, initially you need to insert your documents within bookmarks, for later reference in overview document by extracting content from these bookmarks and appending in overview document. Please check following references for the purpose.
https://docs.aspose.com/words/net/how-to-extract-selected-content-between-nodes-in-a-document/
https://forum.aspose.com/t/107549
Secondly for merge document page number requirement, as word is flow document so there is no direct way to get page number but you can achieve this by inserting PAGE field and getting page number while iterating through bookmarks and then append with bookmarks contents in overview document. Kindly have a look at following thread for getting page number.

Please feel free to contact us for any further assistance.
Best Regards,

The referenced link for extracting content from a book mark states to use the extractContent() function. Is there a specific Aspose class I need to call to utilize that? I cannot find it in my current version (11.4).

Hi David,
Please check the hyperlink, given in start of the article for the ExtractContent method and other dependent methods found in the article: Extract Content Overview and Code.
Please feel free to contact us for any further assistance.
Best Regards,