更改占位符形状

时间:2019-06-25 12:11:30

标签: python python-pptx

我们可以将占位符的形状从普通矩形更改为圆形矩形吗?

我尝试了以下代码:

from pptx import Presentation
from pptx.enum.shapes import MSO_SHAPE

prs = Presentation(path)
title_slide_layout = prs.slide_layouts[4]
slide = prs.slides.add_slide(title_slide_layout)

placeholder = slide.placeholders[1]
placeholder.auto_shape_type = MSO_SHAPE.ROUNDED_RECTANGLE ## error is coming on this line

但这给出了错误:

AttributeError: can't set attribute

此外,我在文档中找不到任何内容。可以通过python完成吗?

0 个答案:

没有答案