This example gets the third paragraph of the document.
try { Application application = Application.getInstance(); Documents documents = application.getDocuments(); Document document = documents.openDocument("D:\\test.odt", true); TextParagraph paragraph = document.getParagraphs().item(3); } catch(Exception e) { e.printStackTrace(); }
Related information