title: Creating Columns in HTML Table Body Email with VBA in Excel
body: <p>I have created a table that will be placed in the body of an Outlook email in HTML format. I am struggling to place the values into proper columns. I have been playing around with "td" tags, but unsuccessful. All the values are now next to each other without spaces between them and therefore not in proper table format. Please help!</p>
  
  <p>My code:</p>
  
  <pre><code>Public Sub HypMail4()
  
  Dim OutApp As Object
  Dim OutMail As Object
  Dim strbody As String
  
  Set Out App = CreateObject("Outlook.Application")
  Set OutMail = OutApp.CreateItem(0)
  
  strbody = ""
  strbody = strbody &amp; _
  "&lt;html&gt;" &amp; "&lt;table&gt;" &amp; "&lt;font color = ""red""&gt;&lt;b&gt;" &amp; Range("A1") &amp; 
  Range("B1") &amp; Range("C1") &amp; Range("D1") &amp; Range("E1") &amp; "&lt;/font&gt;&lt;/b&gt;" &amp; " 
  &lt;/th&gt;" &amp; _
  "&lt;tr&gt;" &amp; Range("A2") &amp; Range("B2") &amp; Range("C2") &amp; Range("D2") &amp; Range("E2") 
   &amp; "&lt;/tr&gt;"
  strbody = strbody &amp; _
  "&lt;tr&gt;" &amp; Range("A3") &amp; Range("B3") &amp; Range("C3") &amp; Range("D3") &amp; Range("E3") 
  &amp; "&lt;/tr&gt;"
  strbody = strbody &amp; _
  "&lt;tr&gt;" &amp; Range("A4") &amp; Range("B4") &amp; Range("C4") &amp; Range("D4") &amp; Range("E4") 
  &amp; "&lt;/tr&gt;" &amp; "&lt;/table&gt;" &amp; "&lt;/html&gt;"
  
  On Error Resume Next
  
  With OutMail
      .To = "zzz@example.com"
      .CC = ""
      .BCC = ""
      .Subject = "Test"
      .HTMLBody = strbody
      .Send
  End With
  
  On Error GoTo 0
  
  Set OutMail = Nothing
  Set OutApp = Nothing
  
  End Sub
  </code></pre>