Using latest Aspose.Words dll, ImportFormatMode KeepDifferentStyles works differently, if style Normal is different (in two merge documents) versus any other style.
The following documents illustrate this:
- TestMainNormal.docx has style Normal defined as Arial Narrow, 14 pt. All document body text in Main use this Normal style.
- TestPartNormal.docx has style Normal defined as Arial Narrow, 8 pt. All document content in Part use this Normal style.
As the Part document is appended to the Main by Aspose, it should create new style Normal_0 (Arial Narrow, 8 pt) and use it for all content from Part document. But that is not the case: the Part content uses Normal style from Main, resulting Arial Narrow 14 pt formatting.
For any other style but Normal the behavior is different. By testing with documents TestMainTestStyle.docx and TestPartTestStyle.docx you can see that after appending Part to Main, content from Part is formatted as Arial Narrow 8 pt, as expected.
This KeepDifferentStyles behavior for Normal style has changed at some point. Using Aspose Words 15.5 it works consistently regardless of style. In Aspose Words 20.1 handling of Normal style differences is broken, as described above.
Sample documents.zip (63.8 KB)
Sampleapp.zip (624 Bytes)