i found a simpler way round this, i read somewhere that open office simply
converted .rtf files to .doc, so i just handle it using the rtf handler, but
i wanted to do it so it would try handling it with poi, in case it catches a
IllegalPropertySetDataException, to handle it with rtf handler, but it
always gives me the exception...

Example of what i'm trying to do:

        try {
                content = docextractor.getText();               
        } catch (IllegalPropertySetDataException ipsde) {
                try {
                        DefaultStyledDocument styledDoc = new 
DefaultStyledDocument();
                        new RTFEditorKit().read(fisdoc, styledDoc, 0);
                        content = styledDoc.getText(0, styledDoc.getLength());
                } catch (BadLocationException ble) {
                        return;
        }
                finally {
                        return;
                }

I don't know if there's any "bad programming in this", for now i just wanted
it to work :p

thank you, 

chris
-- 
View this message in context: 
http://www.nabble.com/Problem-with-word-documents-tf4877644.html#a14022202
Sent from the POI - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to