Retain 'Page X of Y' while combining documents


#1

While combining word documents, is there a possibility of retaining the footers on individual documents AS IS in the final document? What I mean is, if doc1 has footer content 'Page 1 of 2', 'Page 2 of 2' and doc2 has footer 'Page 1 of 1', the footer in the final document has 'Page 1 of 3', 'Page 2 of 3' and 'Page 3 of 3'. Instead, I would like to have the footers as 'Page 1 of 2', 'Page 2 of 2' and 'Page 1 of 1' in the final document also. Using PageSetup.RestartPageNumbering and PageSetup.PageStartingNumber, I could modify the current page number, but I also want to modify the total number of pages display in the footer.

Please help.


#2

Well, I cannot find any possibilty to achieve this in MS Word. If you will find how to do this in MS Word we will try to support this in Aspose.Words too.



Regards,


#3

Thank you for the quick response. This feature is not supported in MS Word as far as I know, but I just wanted to confirm.


#4

I have found that this could be done by using SECTIONPAGES field instead of NUMPAGES field in the source documents.

The source documents should be inserted each into the separate seaction of the destination document. If the source document consists of only one section, then it is easy. Just import this section into the destination document. If not, you need to import the nodes from several sections of the source document one by one into the single section of the destination document. Expression Page {PAGES} of {NUMPAGES} should be substituted with Page {PAGES} in {SECTIONPAGES}.

Best regards,