Free Support Forum - aspose.com

Problem while inserting bullet list :

Dear Team,
I am using Aspose latest version for doc conversion. I cannot able to insert bullet list using Style .

My Code :

Style listStyle = doc.getStyles().add(StyleType.LIST, “myStyle”);
com.aspose.words.List list = doc.getLists().add(listStyle);

for(int i=0; i<9; i++){
ListLevel level2 = list.getListLevels().get(i);
level2.setNumberStyle(NumberStyle.BULLET);
level2.getFont().setName(“Wingdings”);
level2.getFont().setColor(Color.BLUE);
level2.setNumberFormat("\uf0af");
}

for(int i=0;i<2;i++){
para = new Paragraph(doc);
body.appendChild(para);
para.getListFormat().setList(list);
para.getListFormat().setListLevelNumber(1);
builder.moveTo(para);
builder.write(“Anbuu”);
}

doc.save("./Out.doc",SaveFormat.DOC);


Am i doing any wrong? Please help me .

Regards,
Anbu Chezhian.S

Hi Anbu,

Thanks for your request. Maybe in your case, you should use code like suggested here:

http://www.aspose.com/community/forums/299049/can-we-set-custom-list-properties-as-default-properties.in-doc/showthread.aspx#299049

Hope this helps. Please let me know if you need more assistance, I will be glad to help you.

Best regards,