Example: openPresentation method

This example opens a presentation in visible mode and display it's name.

try {
  Application application = Application.getInstance();
  Presentations presentations = application.getPresentations();
  Presentation pre1 = presentations.openPresentation("D:\\test.odp", true);
  System.out.println(pre1.getName());
} catch(Exception e) {
  e.printStackTrace();
}

Related information

openPresentation method