You reported that when using dstDocument.AppendDocument(srcDocument, ImportFormatMode.UseDestinationStyles), the SectionStart property of the source document’s first section changes from SectionStart.Continuous to SectionStart.NewPage, whereas in previous versions, the original Continuous setting was preserved .
While ImportFormatMode.UseDestinationStyles primarily controls how styles are imported, there are indications that section formatting—particularly PageSetup.SectionStart—can be influenced by the context of the destination document or internal normalization during the append operation [2, 3]. Some users have noted that explicitly setting PageSetup.SectionStart on the source document helps control how content is inserted , but your scenario involves preserving the existing Continuous value, not changing it.
There is user-reported confusion about inconsistent handling of SectionStart.Continuous during document appending, especially when the destination document’s structure may affect section break behavior . However, no chunk confirms that this specific behavior change is expected or documented.
The unexpected change from Continuous to NewPage suggests a possible regression or context-sensitive behavior in the current version. This will be reviewed further. In the meantime, please confirm whether the destination document ends with a section or page break, as this may be influencing the outcome. A moderator will follow up once more information is available.
It does not seem to matter whether the dstDocument is set to NewPage or Continous. It behaves the same way.
If I set the last section to Section.Continous after adding the document, it works as expected.
@Nachti The issue WORDSNET-28336 has been introduced as a side effect of WORDSNET-28243 fix, which was added in 25.6 version of Aspose.Words. A draft of the fix is already implemented.
The fix will be included into the next 26.1 version of Aspose.Words. it will be required to use code like the following to prevent appending document with new page section break:
Document dstDoc = new Document();
Document srcDoc = new Document();
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;
ImportFormatOptions options = new ImportFormatOptions { AppendDocumentWithNewPage = false };
dstDoc.AppendDocument(srcDoc, ImportFormatMode.KeepSourceFormatting, options);