I'm sending an email using VBA with the following code:
However, instead of interpreting the body as HTML, it just displays the HTML tags - both in the 'Sent Items' folder of Outlook and on my mobile phone browser. Have I missed something?
VBA Code:
Sub CreateEmail()
'Find the last row of the mailing list
lngLastRow = Sheets("Interface").Cells(Rows.Count, 4).End(xlUp).Row
For lngRowCount = 25 To lngLastRow
'Create and declare an Outlook Application Object
Set objol = New Outlook.Application
Set objmail = objol.CreateItem(olMailItem)
With objmail
.To = Sheets("Interface").Cells(lngRowCount, 4)
' .ReplyRecipients = "*****@gmail.com"
.Subject = "Test Subject"
.BodyFormat = olFormatHTML
.Body = "Testing the <h2>HTML</h2> test"
.NoAging = True
' .Attachments.Add Folder
.send
End With
'Clear the objects after use
Set objmail = Nothing
Set objol = Nothing
Next
End Sub
However, instead of interpreting the body as HTML, it just displays the HTML tags - both in the 'Sent Items' folder of Outlook and on my mobile phone browser. Have I missed something?