2

I am looking for code to extract only the titles from every power point slides. Is there any python function available. Any help is appreciated.

Ankit Kumar
  • 41
  • 1
  • 7
  • 1
    Possible duplicate of [get the title of slides of pptx file using Python](https://stackoverflow.com/questions/40818692/get-the-title-of-slides-of-pptx-file-using-python) – YusufUMS Jul 05 '19 at 05:16

2 Answers2

4

Not by Computer vision (this would be more complicated)

But using some libraries it is possible:

from pptx import Presentation

filename = "test.pptx" #your ppt filename

prs = Presentation(filename)

for slide in prs.slides:
    title = slide.shapes.title.text
    print(title)

Source: How to read PPT titles

Don't forget to install the library:

pip install python-pptx
pedro_bb7
  • 1,601
  • 3
  • 12
  • 28
-1

in previous versions there was a function like this buitl-in. But it has been abandoned.

But if you right click in the Outline view you can choose collapse all, which will give you only the highest level. Then you can copy paste, the slide number of course will not be there, but if you paste to Word every title will be a paragraph so applying a number should do it

Jamal
  • 1