I want to write VBA code for PowerPoint that inserts a preformatted textbox, specifically wrt to bullet formatting on multiple levels (i.e. first level no bullet, second level round bullet, third indented level a dash bullet, fourth intended level a square bullet). See screenshot for example of formatting
What I have tried
- I have a TextPlaceholder (so called in Selection Pane) in Slide Master that is formatted like I want and I hope I can insert that using VBA, but that does not seem to work.
- Changing default text box in PPT and then using VBA to simple insert textbox VBA gets me halfway there, because it only allows me to define the first bullet level.
My question is
- Is it possible to use VBA to insert a formatted a shape / textbox that adheres to format in the Slide Master (e.g. 'TextPlaceholder' in Selection Pane)?
- If not, is there a different solution to insert a formatted textbox that adheres to my desired bullet levels?
Thank you Mike
It's possible to create textboxes with up to 9 levels of formatting by editing the OOXML of the file. Here are my how-to articles: OOXML Hacking: Text Box Styles OOXML Hacking: Styled Text Boxes Complete. Those articles cover manual editing of the OOXML.
You can programmatically manipulate OOXML with VBA code using the downloads mentioned in this article: Edit OOXML with VBA - Cool Code. Using this code, find the bodyStyle section in slideMaster1.xml, copy the section and paste it into the defaultTextStyle section of presentation.xml.