title: Generating document text with formatting
body: <p><strong>UPDATED ATTEMPT:</strong></p>
  
  <p>I've tried the following based on klugerama answer, but it doesn't seem to work for me:</p>
  
  <pre><code>var entries = new List&lt;string&gt;();
  entries.Add("some text here, ");
  entries.Add("some more text here, ");
  entries.Add("and even more text here. ");
  
  foreach (var entry in entries)
  {
  
      object newRangeStart = Globals.ThisDocument.bmkStart.Range.End;
      Globals.ThisDocument.bmkStart.Range.InsertAfter(entry);
      object newRangeEnd = Globals.ThisDocument.bmkStart.Range.End;
      var newRange = Globals.ThisDocument.Range(ref newRangeStart, ref newRangeEnd);
  
      if (entry == "some more text here, ")
      {
          newRange.Bold = -1;
      }
  }
  </code></pre>
  
  <p>First issue is that it inserts the text backwards, i.e:</p>
  
  <blockquote>
    <p>and even more text here. some more text here, some text here,</p>
  </blockquote>
  
  <p>instead of:</p>
  
  <blockquote>
    <p>some text here, some more text here, and even more text here.</p>
  </blockquote>
  
  <p>and the second issue is the original issue, in that bold isn't added.  I am trying to get the output to become:</p>
  
  <blockquote>
    <p>some text here, <strong>some more text here</strong>, and even more text here.</p>
  </blockquote>
  
  <hr>
  
  <p><strong>ORIGINAL QUESTION:</strong></p>
  
  <p>I am trying to create an action pane which gives the user lots of options. Based on the options selected, specific text gets inserted into the document.  I have been able to create the action pane part and the text inserting part fairly quickly and easily.  But the text is inserted without any formatting.</p>
  
  <p>What is the correct way to insert text which easily allows me to add formatting to the text (pro grammatically) which will be inserted in the document?</p>
  
  <p>At the moment, I am doing something like this to generate the text and insert it into the document which makes it difficult to apply formatting:</p>
  
  <pre><code>if (CheckBox1.Checked == true)
  {
      stMainText.Append("some text here, ");
  }
  
  if (CheckBox2.Checked == true)
  {
      stMainText.Append("some more text here, ");
  }
  
  if (CheckBox3.Checked == true)
  {
      stMainText.Append("and even more text here. ");
  }
  
  Globals.ThisDocument.bmkStart.Text = TheText.ToString();
  </code></pre>
  
  <p>If all 3 checkboxes were checked, the output would be something like:</p>
  
  <blockquote>
    <p>some text here, some more text here, and even more text here.</p>
  </blockquote>
  
  <p>Lets say I wanted the text to be inserted as follows (notice the bold):</p>
  
  <blockquote>
    <p>some text here, <strong>some more text here</strong>, and even more text here.</p>
  </blockquote>
  
  <p>How would I do that?</p>
  
  <p>I am using VS2013 to create a word document level application.</p>