Hi there,
i’m trying to use a custom list format (“ListFormat1”) which is defined in my word file. This format references to a style format (“Format1”) in the first layer.
When i create the list in word the style looks correct. But when i insert the list with aspose the listtext has standard format.
Am i doing something wrong here?
My code looks like this:
Document document = new Document("C:/TMP/ListTest.docx");
DocumentBuilder builder = new DocumentBuilder(document);
builder.moveToBookmark("Bookmark", true, true);
Style listStyle = document.getStyles().get("ListFormat1");
ListFormat listFormat = builder.getListFormat();
List list = document.getLists().add(listStyle);
listFormat.setList(list);
builder.write("Hello");
document.save("C:/TMP/ListTestOut.docx", SaveFormat.DOCX);