title: Word 2007 VBA - Making some text BOLD & other ITALIC
body: <p>I have the following code that selects data from an Excel Cell &amp; replaces a specific piece of text in my Word document (for purposes of this question, the Excel Cell has been replaced by a plain text string).</p>
  
  <p>The data ": goes to " is constant, then the data "aaa bbb" can be anything until we reach the " of " which is also constant. Then the data after the " of ", "ccc ddd eee" can be anything until it hits the " - " which is also constant.</p>
  
  <p>Is it possible to make the "aaa bbb" data <strong>BOLD</strong> &amp; UPPER CASE, whilst making the "ccc ddd eee" data into <em>ITALICS</em> ?</p>
  
  <p>": goes to <strong>AAA BBB</strong> of <em>ccc ddd eee</em> - "</p>
  
  <pre><code>Selection.HomeKey Unit:=wdStory
  Selection.Find.ClearFormatting
  Selection.Find.Replacement.ClearFormatting
  With Selection.Find
      .Text = "MOTMDIV1"
      .Replacement.Text = ": goes to aaa bbb of ccc ddd eee - "
      .Forward = True
      .Wrap = wdFindContinue
      .Format = False
      .MatchCase = True
      .MatchWholeWord = False
      .MatchWildcards = False
      .MatchSoundsLike = False
      .MatchAllWordForms = False
  End With
  
  Selection.Find.Execute Replace:=wdReplaceAll
  </code></pre>