Hello,
We have experienced an issue while attempting to use either the KeepDifferentStyles or KeepSourceFormatting ImportFormatMode. Specifically, after merging two documents (attached), the styling of one particular section within the resulting document (attached) appears to have been generated incorrectly, per the ImportFormatMode documentation. A new style was created, but this style has different properties than that of the source document. Moreover, the two subsequent bullets points were assigned the correctly generated style.
Samples.zip (266.1 KB)
Sample Code Snippet which references Aspose.Words 17.8.0.0
private void button1_Click(object sender, EventArgs e)
{
string strFolderPath = @"C:\Users\krassimir.manolov\Documents\Samples\";
string document1 = strFolderPath + "Opening-2722_Source.docx";
string document2 = strFolderPath + "US Naglazyme Long-Term Efficacy.docx";
Document srcDoc = new Document(document1);
Document dstDoc = new Document(document2);
srcDoc.AppendDocument(dstDoc, ImportFormatMode.KeepSourceFormatting);
srcDoc.Save(strFolderPath + "Results_KeepSourceFormatting.docx");
}
Documentation: ImportFormatMode Enum | Aspose.Words for .NET
Do you know whether this issue has been addressed in a newer release?
Thank you,
Krassimir