We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Bulletings in Aspose

How to change the existing bulleting type to new in paragraph

Hi,


Thanks for your inquiry. You can change the exiting list formatting by using Aspose.Words. Please use the following code snippet to change the existing bullets list to BulletTick. Hope this helps you.

<span style=“font-size:10.0pt;
font-family:“Courier New”;color:#2B91AF;mso-font-kerning:0pt;mso-ansi-language:
PL;mso-no-proof:yes”>Document<span style=“font-size:10.0pt;font-family:
“Courier New”;mso-font-kerning:0pt;mso-ansi-language:PL;mso-no-proof:yes”> doc
= new Document(MyDir

  • “in.doc”);<o:p></o:p>

DocumentBuilder builder = new DocumentBuilder(doc);

Aspose.Words.Lists.List list = doc.Lists.Add(ListTemplate.BulletTick);

foreach (Paragraph para in doc.GetChildNodes(NodeType.Paragraph, true))

{

if (para.ListFormat.IsListItem)

{

para.ListFormat.List = list;

}

}

builder.Document.Save(MyDir + "out.doc");


You do not create objects of the ListFormat class directly. You access ListFormat as a property of another object that can have list formatting associated with it. At the moment the objects that can have list formatting are: Paragraph, Style and DocumentBuilder.

ListFormat of a Paragraph specifies what list formatting and list level is applied to that particular paragraph. ListFormat of a Style (applicable to paragraph styles only) allows to specify what list formatting and list level is applied to all paragraphs of that particular style. ListFormat of a DocumentBuilder provides access to the list formatting at the current cursor position inside the DocumentBuilder.

I suggest you please read following documentation links for your kind reference.
http://www.aspose.com/docs/display/wordsnet/List+Class
http://www.aspose.com/docs/display/wordsnet/ListLabel+Class
http://www.aspose.com/docs/display/wordsnet/ListLevel+Class