Thanks for your inquiry. Please check the following code snippet. I have modified the switch statement. Please do not add same list multiple times in the Document by using DocumentBuilder.Document.Lists.Add method. I have attached the complete code with this post.
if (para.BulletType == Aspose.Slides.BulletType.Numbered)//
&& builder.ListFormat.List == null)
{
switch (para.NumberedBulletStyle)
{
case Aspose.Slides.NumberedBulletStyle.BulletArabicPeriod:
if (bullet == ""
|| bullet != "BulletArabicPeriod")
{
builder.ParagraphFormat.ClearFormatting();
builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberArabicDot);
bullet = "BulletArabicPeriod";
}
break;
case Aspose.Slides.NumberedBulletStyle.BulletArabicParenRight:
if (bullet == ""
|| bullet != "BulletArabicParenRight")
{
builder.ParagraphFormat.ClearFormatting();
builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberArabicParenthesis);
bullet = "BulletArabicParenRight";
}
break;
case Aspose.Slides.NumberedBulletStyle.BulletAlphaLCParenRight:
if (bullet == ""
|| bullet != "BulletAlphaLCParenRight")
{
builder.ParagraphFormat.ClearFormatting();
builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseLetterParenthesis);
bullet = "BulletAlphaLCParenRight";
}
break;
case Aspose.Slides.NumberedBulletStyle.BulletRomanUCPeriod:
if (bullet == ""
|| bullet != "BulletRomanUCPeriod")
{
builder.ParagraphFormat.ClearFormatting();
builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberUppercaseRomanDot);
bullet = "BulletRomanUCPeriod";
}
break;
case Aspose.Slides.NumberedBulletStyle.BulletRomanLCPeriod:
if (bullet == ""
|| bullet != "BulletRomanLCPeriod")
{
builder.ParagraphFormat.ClearFormatting();
builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseRomanDot);
bullet = "BulletRomanLCPeriod";
}
break;
case Aspose.Slides.NumberedBulletStyle.BulletAlphaUCPeriod:
if (bullet == ""
|| bullet != "BulletAlphaUCPeriod")
{
builder.ParagraphFormat.ClearFormatting();
builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberUppercaseLetterDot);
bullet = "BulletAlphaUCPeriod";
}
break;
case Aspose.Slides.NumberedBulletStyle.BulletAlphaLCPeriod:
if (bullet == ""
|| bullet != "BulletAlphaLCPeriod")
{
builder.ParagraphFormat.ClearFormatting();
builder.ListFormat.List = builder.Document.Lists.Add(ListTemplate.NumberLowercaseLetterDot);
bullet = "BulletAlphaLCPeriod";
}
break;
}
}