O'Reilly logo

Automate it! - Recipes to upskill your business by Chetan Giridhar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required