Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


Python list pptx slides text

25 Apr 2020 » office, automate
prs = Presentation(eachfile)
print(eachfile)
print("----------------------")
for slide in prs.slides:
  #slide._element.get('show') is None  # not hidden
  #slide._element.get('show') == '0'  # hidden
  for shape in slide.shapes:
      if hasattr(shape, "text"):
          print(shape.text)

https://stackoverflow.com/questions/39418620/extracting-text-from-multiple-powerpoint-files-using-python https://github.com/scanny/python-pptx/issues/319