Free Support Forum -

Insert document to Parent document removes bullet listing

Hi Team,

I got 1 issue while inserting document into main document. The document that I am inserting(source document) has Bullet listing but when I insert that document into main document then we loose bullet listing.

I am using below code for inserting document.

builder.insertDocument(sectionDocument, ImportFormatMode.KEEP_SOURCE_FORMATTING);

builder -> is main document builder.
sectionDocument -> the document that I am inserting has bullet list.

Please see attached documents for your reference.

Bullet Listing Not (59.7 KB)


Thanks for your inquiry. We have tested the scenario using latest version of Aspose.Words for Java 18.6 with following code example. We have not found any issue with bullet list. Please check the attached output document. (26.6 KB)

Document doc = new Document(MyDir + "Main Destination Document.docx");
Document subDoc = new Document(MyDir + "Source Doument with Bullet.docx");
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertDocument(subDoc, ImportFormatMode.USE_DESTINATION_STYLES); + "18.6-Java.docx");

Please note that Aspose.Words mimics the behavior of MS Word. If you perform the same scenario using MS Word, you will get the same output.

Hi Tahir,

It worked for me too , the only difference in my code is ImportFormatMode. I was using “KEEP_SOURCE_FORMATTING”. and you used “USE_DESTINATION_STYLES”.

One thing, I would like to know, does “USE_DESTINATION_STYLES” maintains Source document formatting.

One other thing, why it was not working with “KEEP_SOURCE_FORMATTING”??

Vaibhav Diwan


Thanks for your inquiry.

Please refer to the following article.
Differences between ImportFormat Modes

We have not found this issue while using latest version of Aspose.Words for Java 18.6. Please use Aspose.Words for Java 18.6.