Playing with layouts, placeholders, and textboxes

Now, let's move on to do some interesting operations on PPTs. Importantly, we'll discuss operations that are most frequently used.

Getting ready

No specific modules are required for this recipe; we would use the python-pptx module that was installed for the earlier recipes. In this recipe, we will work with different slide layouts and play with shapes and text.

How to do it...

  1. Let's go further and use a different type of slide layout, along with bulleted content in it. The following code snippet does what we need:
     from pptx import Presentation prs = Presentation() two_content_slide_layout = prs.slide_layouts[3] slide = prs.slides.add_slide(two_content_slide_layout) shapes = slide.shapes title_shape ...

Get Automate it! - Recipes to upskill your business now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.