jf328
jf328

Reputation: 7331

python pptx, bullet points, how to change bullet symbol to numbers

In python pptx module,

p = frame.add_paragraph()
p.text = 'text1'
p = frame.add_paragraph()
p.text = 'text2'

will generate

How can I switch to a numbered list?

  1. text1
  2. text2

Thanks.

Upvotes: 6

Views: 6517

Answers (1)

scanny
scanny

Reputation: 28863

There's not yet an option to change bullet style directly in python-pptx.

However, if you create a slide layout having a numbered bullet placeholder in the 'starting-point/template' deck you start out with, you can use that layout to create the slide you want.

You'll need to understand this bit in the documentation about how python-pptx loads presentations: http://python-pptx.readthedocs.org/en/latest/user/presentations.html

And you'll need to create and use one of your own rather than use the default built-in 'template'.

Upvotes: 5

Related Questions