BulletType.Numbered issue with paragraph into textframe

Hi Aspose,

I am writting some parqagraph into a textframe and also aplying bullet property using below code. But bullets are not coming into slide. please help me to get over it.

TextFrame tf = shp.TextFrame;

tf.WrapText = true;

tf.Paragraphs.Clear();

foreach (DataRow dr in dtPolitical.Rows)

{

//Paragraph with bullet

Paragraph initBulletPara = new Paragraph();

initBulletPara.HasBullet = true;

initBulletPara.BulletType = BulletType.Numbered;

initBulletPara.BulletColor = Color.Black; ;

initBulletPara.BulletHeight = 100;

initBulletPara.Text = dr["PestValue"].ToString();

initBulletPara.Portions[0].FontHeight = 10;

initBulletPara.Portions[0].FontBold = false;

tf.Paragraphs.Add(initBulletPara);

}

Hi Binod,

Thanks for your interest in Aspose.Slides.

I have executed the code snippet as provided by you and used Aspose.Slides for .NET 4.1.1. I have been successfully able to generate the bullets using the said version. For your kind reference, I have attached the generated presentation as well. Please proceed to download section and download the latest version of Aspose.Slides for .NET 4.1.1 available here.

static void Main(string[] args)
{
    Presentation pres = new Presentation("D:\\ppt\\Source.ppt");
    Slide slide = pres.Slides[0];
    Aspose.Slides.Shape shp = slide.Shapes[1];
    TextFrame tf = shp.TextFrame;
    tf.WrapText = true;
    tf.Paragraphs.Clear();
    DataTable dtPolitical = GetTable();

    foreach (DataRow dr in dtPolitical.Rows)
    {
        //Paragraph with bullet
        Paragraph initBulletPara = new Paragraph();
        initBulletPara.HasBullet = true;
        initBulletPara.BulletType = BulletType.Numbered;
        initBulletPara.BulletColor = Color.Black; ;
        initBulletPara.BulletHeight = 100;
        initBulletPara.Text = dr["Patient"].ToString();
        initBulletPara.Portions[0].FontHeight = 10;
        initBulletPara.Portions[0].FontBold = false;
        tf.Paragraphs.Add(initBulletPara);
    }

    pres.Write("D:\\ppt\\Destination.ppt");

}

public static DataTable GetTable()
{
    //
    // Here we create a DataTable with four columns.
    //
    DataTable table = new DataTable();
    table.Columns.Add("Dosage", typeof(int));
    table.Columns.Add("Drug", typeof(string));
    table.Columns.Add("Patient", typeof(string));
    table.Columns.Add("Date", typeof(DateTime));

    // Here we add five DataRows.
    //
    table.Rows.Add(25, "Indocin", "David", DateTime.Now);
    table.Rows.Add(50, "Enebrel", "Sam", DateTime.Now);
    table.Rows.Add(10, "Hydralazine", "Christoff", DateTime.Now);
    table.Rows.Add(21, "Combivent", "Janet", DateTime.Now);
    table.Rows.Add(100, "Dilantin", "Melanie", DateTime.Now);

    return table;
}

Thanks and Regards,

Hi Aspose

thanks for your quick reply.

As you suggest i downloaded the latest version (Aspose.Slides for .NET 4.1.1) but still i am facing the same problem and not getting the bullet numbers in my paragraph. Here i am also attaching the dll file which i am using.

Note: i tried above code with microsoft office 2003 and 2007. in both the cases it's not working.

Hi Binod,

I have worked with DLL file provided by you and am successfully able to generate numbered bullet each paragraph. For your kind reference, i have attached the source and destination presentation files. Please feel free to share, if the problem still persists.

Thanks and Regards,