Hi Jean-Pascal,
Thanks for your inquiry. I would suggest you please read the following article on Lists in Aspose.Words:
https://reference.aspose.com/words/java/com.aspose.words/List
A list in a MS Word document is a set of list formatting properties. The formatting of the lists is stored in the ListCollection separately from the paragraphs of text. You can use DocumentBase.getLists property to access the list formatting used in the document.
Please use the following code snippet to get the existing list in the document and set it for some other paragraphs. I have attached the input and output documents with this post.
Document doc = new Document(MyDir + "Test37.docx");
// Get First Paragraph
Paragraph para = (Paragraph)doc.getChild(NodeType.PARAGRAPH, 0, true);
DocumentBuilder builder = new DocumentBuilder(doc);
builder.moveToDocumentEnd();
builder.writeln("");
builder.writeln("");
if (para.isListItem())
{
builder.getListFormat().setList(para.getListFormat().getList());
for (int i = 0; i < 9; i++)
{
builder.writeln("List Item " + i);
}
}
doc.save(MyDir + "AsposeOut.docx");
Please let us know if you need more information, we are always glad to help you.