title: How to modify RTF file with images from the code
body: <p>I have template of document in RTF format and it contains some text and some images (created with WordPad, Win 7). I need to change some text and save it. I am trying to do it like this (Delphi XE7, Win32 platform, Windows 7 x64 SP1):</p>
  
  <pre><code>  RichEdit1.Lines.LoadFromFile('1.rtf');
    RichEdit1.Lines.SaveToFile('2.rtf');
  </code></pre>
  
  <p>So i didn't change anything yet, but 2.rtf doesn't contain any images anymore and has much smaller size than 1.rtf. Everything else (tables/text/fonts/...) seems to be ok. Any ideas how to preserve all images (and other objects)?</p>
  
  <p>UPDATE1. Just found workaround. I have DevExpress components, if i use TcxRichEdit instead of TRichEdit, then i can keep all objects:</p>
  
  <pre><code>cxRichEdit1.Properties.AllowObjects := True;
  cxRichEdit1.Lines.LoadFromFile('e:\Work\InvoiceGenerator\bin\Invoice2.rtf');
  cxRichEdit1.Lines.SaveToFile('e:\Work\InvoiceGenerator\bin\Invoice3.rtf');
  </code></pre>
  
  <p>But i can't find similar functionality in TRichEdit.</p>