1
votes

I'd like to take a list of sentences and add them as bullets into a text placeholder in python-pptx. However, it turns out that the textplaceholder doesn't have an add_paragraph method, that could have done the job for a text box. any solutions for that, or should I dump the textplaceholder and use a textbox? Thanks, JT

1

1 Answers

0
votes

A placeholder is a shape, much like a textbox is a shape. A text (bullet) placeholder has a .text_frame property that works the same way as the one for a textbox. See the example in the documentation here: https://python-pptx.readthedocs.io/en/latest/user/quickstart.html#bullet-slide-example

If this doesn't work, chances are good the shape is not a text placeholder. If that's the case, elaborate your question with the code you're using so we can see more precisely what you're doing.