Hello, I am trying to output each slide of an input pptx file as a separate presentation (this part works fine). I wish to name the file as the header of the given slide. I’m currently using the below code to identify the header, but it only works about 80% of the time. Other times, it will either fail to return any string, or even return random text from the middle of the body of the slide. Is there a better way to reliably identify the header text of a slide? Please assume that there always is a text header on each slide (I’ve already written a contingency for no header present, which is working).
Thank you
filename = ((IAutoShape)slide.getShapes().get_Item(port)).getTextFrame().getParagraphs().get_Item(0).getPortions().get_Item(0).getText()