IDocument document = officeAplication.getDocumentService().constructNewDocument(IDocument.WRITER,
DocumentDescriptor.DEFAULT);
ITextDocument textDocument = (ITextDocument) document;
textDocument.getTextService().getText().setText("HalloWelt");
textDocument.close();
officeAplication.deactivate();
}
catch (Throwable exception) {
exception.printStackTrace();
}
}