I want to copy all sections content in to a single section. For instance if there are 2 sections in source document then in destination document there should be only one section. The code what i am using now is
for (int i = doc.Sections.Count - 2; i >= 0; i–)
Copy the content of the current section to the beginning of the last section.<?xml:namespace prefix = o ns = “urn:schemas-microsoft-com:office:office” /><o:p></o:p>
(i != 0)
Remove the copied section.
But i am experiencing a problem with the above code. For example in source document there are two sections each section with three pages then after copying all sections content in to one section my destination document is having 5 pages only(this happens because in section two in the second page only half page content is full remaining half is empty but with the help of above code whats happening is ,it is copying third page and second page content in one page only).
I want to copy all sections content of a document in to one section in such a way that number of pages dont vary in source document and destination document even if in source document few pages have only half page filled.
Please help me to resolve this issue.