Ed_OTI
asked on
How can VB/VSTO make 0. the first numeric label of a list in PowerPoint
At the user interface we can make a list of numbered bullets start at 0 rather than 1 by making a numbered list with 0. inserted in front of the first text and then backspacing to wipe out the original 1 bullet:
1. 0. Zero
2. One
3. Two
Now backspace before the 0 to wipe out the 1 then PowerPoint will use the 0 as the numeric bullet and adjust the subsequent bullets:
0. Zero
1. One
2. Two
Another technique is to start a list with no bullets and type the 0. Zero line, then type the 1. One line and PowerPoint will see that you are starting a list and turn the lines into a numeric list starting with 0.
My question is how to automate this using VB when creating slides with Office 2007 or 2010 VSTO.
VSTO appears to be an esoteric art, so I am giving 500 points for what could be 2 lines of code!
1. 0. Zero
2. One
3. Two
Now backspace before the 0 to wipe out the 1 then PowerPoint will use the 0 as the numeric bullet and adjust the subsequent bullets:
0. Zero
1. One
2. Two
Another technique is to start a list with no bullets and type the 0. Zero line, then type the 1. One line and PowerPoint will see that you are starting a list and turn the lines into a numeric list starting with 0.
My question is how to automate this using VB when creating slides with Office 2007 or 2010 VSTO.
VSTO appears to be an esoteric art, so I am giving 500 points for what could be 2 lines of code!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The .Bullet = msoFalse did not work because .Bullet is read-only and contains other properties. The following code works:
.Paragraphs(1).ParagraphFo rmat.Bulle t.Type = PowerPoint.PpBulletType.pp BulletNone
That is the "Magic Bullet" (pun intended) that makes it work.
Thanks again,
Ed
.Paragraphs(1).ParagraphFo
That is the "Magic Bullet" (pun intended) that makes it work.
Thanks again,
Ed
ASKER
I figured I would make an unnumbered list and put in all the numbers. Your code setting the .Bullet = msoFalse makes the fix a "one-liner" -- Thanks!
Ed