I have a question (well thats quiet obvious when i am here )
I am trying to use the XStorable interface on the Document that is currently open in Open Office Writer. The Document was never before saved and I only want to save it in the Temp folder of the Users Pc cause i only need the Document to Convert it into a Byte[] that I can send to our server.
This is what I tried but I realy dont know how I can get it to work:
Code: Select all
XModel xDocModel = this.frame.getController().getModel();
XTextDocument xtextdocument = (XTextDocument) UnoRuntime.queryInterface(XTextDocument.class, xDocModel);
XStorable xStorable = (XStorable) UnoRuntime.queryInterface(XStorable.class, xtextdocument);
PropertyValue[] storeProbs = new PropertyValue[1];
xStorable.storeAsURL("C:\\Windows\\Temp\\Test.odt", storeProbs);
BTW I am using Java and Netbeans to programm it.