Create a Presentation Object to Hold Content
Every PPT API program must create an mlreportgen.ppt.Presentation
object to hold presentation content. To create a presentation object, use the mlreportgen.ppt.Presentation
constructor.
If you use the constructor without arguments, the PPT API creates a presentation named Untitled.pptx
in the current folder. The presentation uses the default PPT API PowerPoint® template.
You can specify the file system path of the presentation as the first argument of the constructor.
For the second argument of the constructor, you can specify a PowerPoint template to use. This Presentation
constructor creates a presentation called myPresentation
in the current folder, using a PowerPoint template called CompanyTemplate.pptx
.
pres = Presentation('myPresentation','CompanyTemplate.pptx');
If the template you use is an existing presentation that includes content, the new presentation that the PPT API generates includes the content in that presentation. You can replace content from the template using the PPT API.