[Python] python-pptx - How to access presentation section titles programmatically?

Discussão em 'Python' iniciado por Stack, Abril 30, 2025.

  1. Stack

    Stack Membro Participativo

    In Powerpoint, I'd like to create agenda / table of content slides, with section titles serving as input to these agenda slides. Sections allow one to structure a presentation document. They are particularly useful in the slide-sorter and outline mode. Conveniently leveraging section titles for the purpose of constructing an agenda slide is a feature of PowerPoint add-ons often found in consulting (Slideproof, Think-Cell,...). The goal is to change one section title, and have this change reflected on all agenda slides -- without having to touch each and every agenda slide.

    Is there a way to access these section titles programmatically, ideally using python-pptx? So far I have tried reading the contents of a sample pptx file with unique section titles. Unfortunately, no success in finding the identical section titles in the pptx file when grepping through the file contents.

    Continue reading...

Compartilhe esta Página