title: Updating the text of a XWPFParagraph using Apache POI
body: <p>I have been able to loop through all paragraphs in a document and get at the text and everything and I have read and understood how you can create a document from scratch. But how can I update and replace the text in a paragraph? I can do <code>createRun</code> in a paragraph but that will just create a new piece of text in it.</p>
  
  <pre><code> ...
   FileInputStream fis = new FileInputStream("Muu.docx");
   XWPFDocument myDoc = new XWPFDocument(fis);
   XWPFParagraph[] myParas = myDoc.getParagraphs();
   ...
  </code></pre>
  
  <p>My theory is that I need to get at the existing "run" in the paragraph I want to change, or delete the paragraph and add it again) but I cannot find methods to do that.</p>