c# - Why does my custom layout placeholder text box without bullets produce a slide text box with bullets? -
i have following powerpoint 2010 c# add-in code (the "test" button only). don't understand why slide created manually, using customlayout ppplaceholderbody set ppbulletnone, produces bulleted text box placeholder. slide master layout in powerpoint looks fine no bullet. i'm sure there must more setting bullet none understand. can shed light on this?
private void button4_click(object sender, eventargs e) { powerpoint.customlayout ppcl = globals.thisaddin.application.activepresentation.slidemaster.customlayouts.add( globals.thisaddin.application.activepresentation.slidemaster.customlayouts.count + 1); ppcl.name = "my custom master layout - text without bullet!"; powerpoint.shape ppshape = ppcl.shapes.addplaceholder(powerpoint.ppplaceholdertype.ppplaceholderbody); ppshape.textframe.textrange.text = "candidate"; ppshape.textframe.textrange.paragraphformat.bullet.type = powerpoint.ppbullettype.ppbulletnone; }
thanks in advance helping... i've been working on longer i'd admit.
-aaron
here's solution: shape text needs set after ppbulletnone applied. makes sense because paragraph text created using default bullet , not automatically changed when shape changed. duh.
just flip last 2 lines in original question so:
ppshape.textframe.textrange.paragraphformat.bullet.type = powerpoint.ppbullettype.ppbulletnone; ppshape.textframe.textrange.text = "candidate";
anyone give me point can begin others?
Comments
Post a Comment