title: How to insert lines in a paragraph in Interop Word using C#
body: <p>I'm trying to insert a paragraph after a specific line. I'm looping through the list of lines to print in the paragraph, the issue with my code below is, it only prints the last line from the list.</p>
  
  <pre><code>Microsoft.Office.Interop.Word.Paragraph para = doc.Paragraphs.Add();
  Microsoft.Office.Interop.Word.Range r = para.Range;
  r.InsertAfter("Insert below:" + "\n");
  string style = "Normal";
  object objstyle = style;
  r.set_Style(ref objstyle);
  foreach (List line in list_of_lines)
  {
   r.Text = line.name.ToString()+":"+line.value.ToString();
   r.InsertParagraphAfter();
  }
  </code></pre>
  
  <p>r.Text is overwritten each time and it only prints the last value.</p>