Free Support Forum -

Append document - list format issue

I’m trying to append one document to another using this code :

Document document = new Document(“E:\doc1.doc”);
Document docToAppend= new Document(“E:\doc2.doc”);
document.appendDocument(docToAppend, ImportFormatMode.KEEP_SOURCE_FORMATTING);

The problem is that in the result document there are some differences in list style.
I’m attaching documents and screen with details.
I guess that problem is with some document (doc1.doc) settings because if I create brand new document it works fine.

Thanks in advance for help.


Thanks for your request. I have checked the issue with the latest version of Aspose.Words and could not reproduce it. Please try using the latest version; you can download it from here:

Best Regards,

Nabeel Ahmad

I’ve tried the latest version. It gives the same result.
I’m attaching result document.


Thank you for additional information. It is expected behavior. If you try checking DefaultTabStops in your destination and source documents you will see the difference. Please try using the following code:

Document document = new Document("C:\\Temp\\doc1.doc");

// Check Default Tab Stop


// Set Default Tab Stop


Document docToAppend= new Document("C:\\Temp\\doc2.doc");

// Check Default Tab Stop


document.appendDocument(docToAppend, ImportFormatMode.KEEP_SOURCE_FORMATTING);"C:\\Temp\\out.doc");

Or you can change DefaultTabStop manually in MS Word.

Best regards,