can someone tell me where can I find some read/write word documents
samples?
I have to insert some text in a word document, after a specified
sequence of known text.
I've tried some code, but, the final word doc was corrupted
========================================================================
======
public static void main(String[] args){
try
{
HWPFDocument doc = new HWPFDocument (new FileInputStream
(args[0]));
Range r = doc.getRange();
r.insertAfter("this is the text that I wanna insert");
OutputStream out = new FileOutputStream(args[1]);
doc.write(out);
out.flush();
out.close();
}
catch (Throwable t){
t.printStackTrace();
}
}
========================================================================
=========
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]