title: Excel to Ms Project VBA - Insert task, set font, underline and Italics
body: <p>I have the following lines of code in VBA (Excel), successfully generating tasks in MS Project, with the correct outline level established. However, I would like to set the formatting of the 'Name field' of a specific task to be have an underline AND OR be italicized:</p>
  <p>Sample Code:</p>
  <pre><code>ActiveProject.Tasks.Add (&quot;Enter Task Name #1&quot;)
  ActiveProject.Tasks (&quot;Enter Task Name #1&quot;).OutlineLevel = 1
  ActiveProject.Tasks.Add (&quot;Enter Task Name #2&quot;)
  ActiveProject.Tasks (&quot;Enter Task Name #2&quot;).OutlineLevel = 2
  ActiveProject.Tasks.Add (&quot;Enter Task Name #3&quot;)
  ActiveProject.Tasks (&quot;Enter Task Name #3&quot;).OutlineLevel = 3
  </code></pre>
  <p>How would I go about setting formatting options to a task that is being imported <strong>or</strong> selecting the imported task and setting the required formatting?</p>