This example displays the word number of the document.
try { Application application = Application.getInstance(); Documents documents = application.getDocuments(); Document document = documents.openDocument("D:\\test.odt", true); System.out.println(document.getWordCount()); } catch(Exception e) { e.printStackTrace(); }
Related information