title: docx4j - replacing a bookmark with text and style
body: <p>I have a similar problem as <a href="https://stackoverflow.com/questions/24998463/xpages-docx4j-replacing-a-bookmark-with-text">XPages - docx4j - replacing a bookmark with text</a> but I would like to keep the style.
  My bookmark is not on a text (because it's a docx created by Google Docs), I'd like to keep the text after my bookmark to include it in the bookmark and keep its style.
  For example :</p>
  
  <pre><code>&lt;w:bookmarkStart w:colFirst="0" w:colLast="0" w:name="3znysh7" w:id="2"/&gt;&lt;w:bookmarkEnd w:id="2"/&gt;
  &lt;w:r w:rsidDel="00000000" w:rsidR="00000000" w:rsidRPr="00000000"&gt;
      &lt;w:rPr&gt;
          &lt;w:rFonts w:ascii="Calibri" w:cs="Calibri" w:eastAsia="Calibri" w:hAnsi="Calibri"/&gt;
          &lt;w:i w:val="1"/&gt;
          &lt;w:color w:val="1e4d78"/&gt;
          &lt;w:rtl w:val="0"/&gt;
      &lt;/w:rPr&gt;
      &lt;w:t xml:space="preserve"&gt;MY_BOOKMARK&lt;/w:t&gt;
  &lt;/w:r&gt;
  </code></pre>
  
  <p>I found a solution to erase the text after the bookmark, I found a solution to add the text inside the bookmark, but I'm unable to keep the style.</p>
  
  <p>I'm not native English speaker, so do not hesitate to ask me if I'm not clear.</p>