The format of Paragragh had been changed after combined document using the standard method

Hi guys
We encountered a problem when merging documents by using Aspose.Word which version is 2022.11 . The code is C# and attachments are shown below.

Document src = new Document("d:\\sub.docx");
Document dest = new Document("d:\\main.docx");
            
dest.AppendDocument(src ,ImportFormatMode.KeepSourceFormatting );
dest.Save("d:\\combined.docx", SaveFormat.Docx);

combined.docx (2.4 MB)
main.docx (525.6 KB)
sub.docx (2.4 MB)

The name of the problem document is combined.docx. Please switch to page 5. The position shown in the red box in the screenshot below shows that the header line of the original document sub.docx has no color. After merging the document, it turns orange.

@wengyeung
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-25032

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

As a temporary workaround you can use ImportFormatMode.KeepDifferentStyles:

Document src = new Document(@"C:\Temp\sub.docx");
Document dest = new Document(@"C:\Temp\main.docx");
dest.AppendDocument(src, ImportFormatMode.KeepDifferentStyles);
dest.Save(@"C:\Temp\out.docx", SaveFormat.Docx);

in this case the text color is not changed after appending documents.

The issues you have found earlier (filed as WORDSNET-25032) have been fixed in this Aspose.Words for .NET 23.4 update also available on NuGet.