I'm using Python 2.7.2 and Office 2010 on Windows 7. I have a Powerpoint file that has links to other documents in a directory. I would like to use Python to loop through the shape captions, find matching names in the directory, and create a hyperlink in the Powerpoint file. As long as I can read those shape captions I can do the rest.
I managed to do this and at least open the Powerpoint file:
import win32com.client
Presentation = Application.Presentations.Open("c:\\path\\to\\stnd4.pptx")
I have found a number of ways to add slides that don't already exist and add shapes or captions, but I can't seem to find any way to edit existing slides. This lets me add a slide:
Base = Presentation.Slides.Add(1, 12)
But anything that tries to open or edit an existing slide just fails:
Base = Presentation.Slides.Open(1)
Base = Presentation.Slides.Edit(1)
I also tried
help(Presentation)
but I just get generic win32com
info, nothing on Powerpoint slides. Googling didn't turn up much, either. Any clues?