Example: Name property

This example displays the name of the document.

try {
  Application application = Application.getInstance();
  Documents documents = application.getDocuments();
  Document document = documents.openDocument("D:\\test.odt", true);
  System.out.println(document.getName());
} catch(Exception e) {
  e.printStackTrace();
}

Related information

Name property