What is the correct way to implement bullet functionality in powerpoint Autoshape

那年仲夏 提交于 2020-02-25 07:11:06

问题


I made a function to apply custom bullets up to 5 levels parent, level 1, level 2, level 3 and none.

            shapeR.TextFrame.Ruler.Levels[1].FirstMargin = 0;
            shapeR.TextFrame.Ruler.Levels[1].LeftMargin = (float)40.53543;

            shapeR.TextFrame.Ruler.Levels[2].FirstMargin = 60;
            shapeR.TextFrame.Ruler.Levels[2].LeftMargin = (float)100.53543;

            shapeR.TextFrame.Ruler.Levels[3].FirstMargin = 120;
            shapeR.TextFrame.Ruler.Levels[3].LeftMargin = (float)160.53543;

            shapeR.TextFrame.Ruler.Levels[4].FirstMargin = 180;
            shapeR.TextFrame.Ruler.Levels[4].LeftMargin = (float)220.53543;

            shapeR.TextFrame.Ruler.Levels[5].FirstMargin = 240;
            shapeR.TextFrame.Ruler.Levels[5].LeftMargin = (float)280.53543;

            ApplyBulletStyle(bullet_Character, textR);//works good 
            //whats inside this function is  textR.ParagraphFormat.Bullet.Character = '○'; with different characters

            PowerPointApp.ActiveWindow.Selection.TextRange.IndentLevel = 1;//or 2 ,3,4 ,5

But this code doesn't work good some times

  1. there is an indentation issue.

  2. main issue occurs when I used numbered bullets like 4 lines or paragraphs have 1. ,2. type bullets and if I change middle oneto a),b) type bullet bullets of all para changes.

Also tried left indent property but second point error occurs.

I am using visual studio 2019 and addin express

来源:https://stackoverflow.com/questions/59728562/what-is-the-correct-way-to-implement-bullet-functionality-in-powerpoint-autoshap

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!