Hi Steeve,
Thanks for this additional information.
That technique seems fine to me, although I’m not entirely sure of what you are trying to achieve. It seems you are inserting a section break and then simply combining the sections again. If you are looking to have the content of each page contained within one section then you may want to use this code below.
<span style=“font-size:
10.0pt;font-family:“Courier New”;color:blue;mso-no-proof:yes”>for<span style=“font-size:10.0pt;font-family:“Courier New”;mso-no-proof:yes”> (int page = 1; page < doc.PageCount; page++)<o:p></o:p>
{
ArrayList sections = finder.RetrieveAllNodesOnPages(page, page, NodeType.Section);
Section firstSection = (Section)sections[0];
foreach (Section section in
sections)
{
if (section
!= firstSection)
{
firstSection.AppendContent(section);
section.Remove();
}
}
}
If we can help with anything else, please feel free to ask.
Thanks.