title: RichTextBox loses all the formatting when exporting to word
body: <p>I copied word content to richtextbox without loosing format perfectly, but now I am editing the content in the richtextbox. </p>
  
  <p>Now I want to export the richtextbox content to a word document without losing any formating, in C# using WinForms. How do you do it?</p>
  
  <pre><code>WordApp.ActiveDocument.SaveAsQuickStyleSet("abc.doc");
  
  Range rng = WordApp.ActiveDocument.Range(0, 0);
  
  
  for (int i = 0; i &lt; _dgvrow.Cells.Count; ++i)
  {
      // add code to loop thru controls and TypeText into word document
  
      Label lb  = (Label)this.Controls["lblfield" + (i+1).ToString()];
      rng.Text += lb.Text;
      rng.Select();
  
      Control ctrl = this.Controls["txtfield" + (i+1).ToString()];
  
      if(ctrl is RichTextBox)
      {
          RichTextBox rb = (RichTextBox)ctrl;
          rng.Text += rb.Text + Environment.NewLine;
          rng.Select();
      }
      else if (ctrl is TextBox)
      {
          TextBox rb = (TextBox)ctrl;
          rng.Text += rb.Text + Environment.NewLine;
          rng.Select();
      }
  }
  </code></pre>