Hello
I have a problem.
 I want Words   in a . doc replace with following Code:

 HWPFDocument doc;
               try {
                   doc = new HWPFDocument(new
FileInputStream("C:\\Desktop\\
Blubber.doc"));
                     Range range = doc.getRange();


               range.replaceText("$blubber", "muh");
               OutputStream out = new
FileOutputStream("C:\\Desktop\\Blubber2.doc");

               doc.write(out);

               out.flush();
               out.close();



       System.out.println("ready");
               } catch (FileNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
               } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
               }



However, if I want to open the resulting file, Word gives me the following
error message "The document is too large for Word"

It would be nice if they could help me, because I need this program
Thanks you

Reply via email to