title: How do I write bold text to a Word document programmatically without bolding the entire document?
body: <p>My program needs to generate highly simple reports in the Office <code>.doc</code> format (non-XML), and certain parts of the document need to be bold. I've been looking at the documentation for <a href="http://msdn.microsoft.com/en-us/library/2a9dt54a.aspx">defining ranges</a>, which is partly what my code derives from at the moment. <a href="http://msdn.microsoft.com/en-us/library/aa224034%28v=office.11%29.aspx">This</a> part of the documentation doesn't really give me enough details to implement this in general in my document. Here is my code so far:</p>
  
  <pre><code>object miss = System.Reflection.Missing.Value;
  object Visible = true;
  object start = 0;
  
  Microsoft.Office.Interop.Word.Application WordApp = new Microsoft.Office.Interop.Word.Application();
  Document report = WordApp.Documents.Add(ref miss, ref miss, ref miss, ref miss);
  
  String header = "Bold Header: ";
  Range headerRange = report.Range(ref start, ref miss);
  headerRange.Text = header;
  headerRange.Font.Bold = -1;
  
  String data = "Information underneath the header";
  Range dataRange = report.Range();
  dataRange.Text = data;
  dataRange.Font.Bold = 1;
  
  object filename = "test.doc";
  
  report.SaveAs(ref filename, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss, ref miss);
  object saveChanges = Microsoft.Office.Interop.Word.WdSaveOptions.wdPromptToSaveChanges;
  object originalFormat = Microsoft.Office.Interop.Word.WdOriginalFormat.wdWordDocument;
  object routeDocument = true;
  WordApp.Visible = true;
  </code></pre>
  
  <p>This produces a word document with only the text <code>**Information underneath the header**</code>. This is a simple example. </p>
  
  <p>My document won't get much more complicated than this, but I'm hoping to generate Word documents based on variable amounts of data, with bold text and non-bold text dispersed throughout.</p>