I have a slide template that has a text placeholder. How do I insert and format text in that specific text placeholder ?
text_ph1 = slide1.placeholders[14]
text_ph2 = slide1.placeholders[15]
para1 = ['Text for para 1']
para2 = ['Text for para 2']
p = text_ph1.paragraphs[0]
run = p.add_run()
run.text = para1[0]
font = run.font
font.name = 'Calibri'
font.size = Pt(14)
font.bold = False
font.italic = None
AttributeError Traceback (most recent call last)
<ipython-input-205-ce3eb19a0d8b> in <module>
2 text_frame.clear() # not necessary for newly-created shape
3
----> 4 p = text_ph1.paragraphs[0]
5 run = p.add_run()
6 run.text = para1[0]
AttributeError: 'SlidePlaceholder' object has no attribute 'paragraphs'