Hello,
When creating a new List, we must add a parameter, in order to specify which ListTemplate is used to create a List. I would like to do the reverse operation : from an existing List, to get the ListTemplate it uses.
If such an operation is not possible, how can I do to obtain for each level of the list the bullet used ?
Thank you very much
Hi Jean-Pascal,
<span lang=“EN-GB” style=“font-size:10.0pt;font-family:“Courier New”;color:#2B91AF;mso-font-kerning:
0pt;mso-no-proof:yes”>Document<span lang=“EN-GB” style=“font-size:10.0pt;
font-family:“Courier New”;mso-font-kerning:0pt;mso-no-proof:yes”> doc = new Document(MyDir
- “Test37.docx”);<o:p></o:p>
//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");
Thanks for your answer but I still don’t understand how to get the ListTemplate constant when reading a document.
For example, let’ s say I have a document with ListTemplate.NUMBER_ARABIC_DOT list. When parsing this document with Aspose Word I would like to retrieve this information.
Is there some way to do that for example something like :
ListTemplate listTemplate = doc.getLists().get(0).getListTemplate();
or
ListTemplate listTemplate = doc.getLists().get(0).getListLevels().get(0).getListTemplate();
Best Regards,
Jean Pascal
Hi Jean-Pascal,
Thank you for the answer.
Do you know approximately when will this feature be supported ?
Best regards
Jean Pascal
Hi Jean-Pascal,