Hi
Hello Ivica,
As you are using different shapes in the notes using Power Point 2007, you can save presentation into Power Point 2007 (pptx) format and use the following code to get text from all shapes in the notes.
try {
PresentationEx pres = new PresentationEx("d:\\ppt\\ivi\\notes-test\\notes-test1.pptx");
SlideEx sld=pres.getSlides().get(0);
NotesSlideEx nt=sld.getNotesSlide();
for(int i=0;i<nt.getShapes().size();i++){
ShapeEx shp=nt.getShapes().get(i);
if( shp instanceof AutoShapeEx ){
AutoShapeEx ashp=(AutoShapeEx)shp;
TextFrameEx tf=ashp.getTextFrame();
if(tf!=null)
System.out.print(tf.getText());
}
if( shp instanceof GroupShapeEx ){
GroupShapeEx gshp=(GroupShapeEx)shp;
for(int j=0;j<gshp.getShapes().size();j++){
ShapeEx shp1=gshp.getShapes().get(j);
if( shp1 instanceof AutoShapeEx ){
AutoShapeEx ashp1=(AutoShapeEx)shp1;
TextFrameEx tf1=ashp1.getTextFrame();
if(tf1!=null)
System.out.print(tf1.getText());
}
}
}
}
} catch (IOException e) {
e.printStackTrace();
}
}