Automation of PowerPoint Reports from Spotfire using ironpython

I would like to use the text areas in spotfire to create buttons which generate powerpoint presentations containing some of the visualizations in the DXP file in a customized way. I have already found some scripts in internet on this topic, however I would like to use the company layout for the powerpoint reports.

The following code works, however this gives me a blank slide.

import clr
clr.AddReference("Microsoft.Office.Interop.PowerPoint")
import Microsoft.Office.Interop.PowerPoint as PowerPoint
####################
# Powerpoint setup
pptx = PowerPoint.ApplicationClass()
pptx.Visible = True
pres=pptx.Presentations.Open("V:\..\Leo.pptx")
slideCounter = 1
slide=pres.Slides.Add(slideCounter, PowerPoint.PpSlideLayout.ppLayoutBlank)

 

Instead of 

slide=pres.Slides.Add(slideCounter, PowerPoint.PpSlideLayout.ppLayoutBlank)

I would like to write something like:
slide=pres.Slides.AddSlide(slideCounter, pres.SlideMaster.CustomLayouts(1))

However this gives an error.

Attachments

AttachmentSize
File leo.pptx16.62 KB

(1) Answer

Login