Hi,
I need to read the source format of an instantiated presentation, but unfortunately, Presentation.getSourceFormat() returns either SourceFormat.Ppt or SourceFormat.Pptx. Test files I have are ppt, pptx, pps, ppsx, ppsm, pptm, pot, potm, ppsm… Is there a way to get the correct source format of an instantiated presentation?
Test code:
IPresentation presentation = new Presentation("04-02_Technik.potm");
System.out.println("04-02_Technik.potm: " + presentation.getSourceFormat());
presentation = new Presentation("16-18-budget-presentation.ppsx");
System.out.println("16-18-budget-presentation.ppsx: " + presentation.getSourceFormat());
presentation = new Presentation("20-PowerPoint-Template.pot");
System.out.println("20-PowerPoint-Template.pot: " + presentation.getSourceFormat());
presentation = new Presentation("315_1_EIA_PPT_HU.potx");
System.out.println("315_1_EIA_PPT_HU.potx: " + presentation.getSourceFormat());
presentation = new Presentation("316CD_BuildingATeam.pps");
System.out.println("316CD_BuildingATeam.pps: " + presentation.getSourceFormat());
presentation = new Presentation("a.pptm");
System.out.println("a.pptm: " + presentation.getSourceFormat());
presentation = new Presentation("Bright be seen.ppsm");
System.out.println("Bright be seen.ppsm: " + presentation.getSourceFormat());
presentation = new Presentation("Presentation1.ppt");
System.out.println("Presentation1.ppt: " + presentation.getSourceFormat());
presentation = new Presentation("Presentation1.pptx");
System.out.println("Presentation1.pptx: " + presentation.getSourceFormat());
Test files: Zippyshare.com - [now defunct] Free File Hosting
Thanks,
Zeljko