title: How to split a .doc into several .doc using JAVA POI?
body: <p>I am using <code>POI</code> to read <code>.doc</code> files, and I want to select some of the contents to form new <code>.doc</code> files. Specifically speaking, is it possible to write the content of a “paragraph” in the “range” to a new file? Thank you.</p>
  
  <pre><code>HWPFDocument doc = new HWPFDocument(fs);
  Range range = doc.getRange();
  for (int i = 0; i &lt; range.numParagraphs(); i++) {
      //here I wish to write the content in a Paragraph
      //into a new .doc file "doc1""doc2"
      //instead of doc.write(pathName) that only write one .doc file.
  }
  </code></pre>