title: jQuery: create Outlook email object
body: <p>I am pretty new to JavaScript / jQuery and hope someone here can help me with the following: </p>
  
  <p>I am using the following VBA code in an Excel file in order to prepare a formatted email in Outlook. 
  The code is short, easy to adjust and works perfect, incl. preparing the email recipient, the subject and the HTML body. </p>
  
  <p>As this works without issues in VBA I hope there is also a way to achieve the same in JavaScript / jQuery. I tried mailto. This works for the recipient and subject but not for the HTML body which is displayed as plain text instead. </p>
  
  <p><strong>My VBA code (working):</strong> </p>
  
  <pre><code>Sub Test()
  Dim olApp As Object
  Dim olOldBody As String
  
  Set olApp = CreateObject("Outlook.Application")
  
  With olApp.CreateItem(0)
      .GetInspector.Display
      olOldBody = .HTMLBody
      .Importance = 2
      .To = "email@company.com"
      .Cc = ""
      .Bcc = ""
      .Subject = "My subject text"
      .HTMLBody = "&lt;span style='font-family: Arial, Helvetica, sans-serif; font-size:11pt; color: #00457C;'&gt;" &amp; _
          "&lt;strong&gt;Title1:&lt;/strong&gt;Line1&lt;br /&gt;" &amp; _
          "&lt;strong&gt;Title2:&lt;/strong&gt;Line2&lt;br /&gt;" &amp; _
          "&lt;strong&gt;Title3:&lt;/strong&gt;Line3&lt;br /&gt;&lt;/span&gt;" &amp; olOldBody
      .Display
  End With
  
  End Sub
  </code></pre>
  
  <p>Thanks for any help with this, Tim</p>