Reputation: 467
The company I work for has a standard PowerPoint template. I'm trying to use this template with python-pptx. However, I'm getting an unwanted slide at the start of my slide deck and I can't figure out what I'm doing wrong.
My first attempt was a simple:
prs = Presentation('companyTemplate.potx')
but this gave several errors.
I then read the manual (yeah, I know) and realized I should have converted the .potx file into a standard PowerPoint .pptx file.
My second attempt was:
prs = Presentation('companyTemplate.pptx')
This worked but my desired PowerPoint slide deck had the entire template PowerPoint at the start.
At this point, I created a new, blank, PowerPoint using the default PowerPoint template and switched to Slide Master view.
This works but, as noted at the start, I'm getting a single unwanted slide at the start of my desired slide deck.
It's easy enough to delete this unwanted slide but I'd like to keep it from appearing in the first place.
When I use the default presentation in python-pptx, I don't get an unwanted slide at the start, so I figure there has to be a way to do what I want. I just can't figure out how.
For what it's worth, the unwanted slide is the last "slide" in Slide Master view, and is labeled "Blank". It's also the slide that appears if I open my own personal companyTemplate.pptx PowerPoint file.
Upvotes: 0
Views: 23