Here this includes a section which will create the HTML from the range in the code:
Sub Mail_Sheet_Outlook_Body()
' You need to use this module with the RangetoHTML subroutine.
' Works in Excel 2000, Excel 2002, Excel 2003, Excel 2007, Excel 2010, Outlook 2000, Outlook 2002, Outlook 2003, Outlook 2007, and Outlook 2010.
Dim OutApp As Object
Dim OutMail As Object
Dim FinalRow As Long
Dim HTMLCell As Variant
Dim HTMLStr As String
FinalRow = Range("A50000").End(xlUp).Row
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
For HTMLCell = 1 To FinalRow Step 1
If HTMLCell = 1 Then
HTMLStr = Cells(HTMLCell, 1)
Else
HTMLStr = HTMLStr & Cells(HTMLCell, 1)
End If
Next HTMLCell
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "me@me.com"
.CC = ""
.BCC = ""
.Subject = "hi"
.HTMLBody = HTMLStr
.Display
End With
Set OutMail = Nothing
Set OutApp = Nothing
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub
Don't forget to add reputation by clicking the star on the bottom left if you're query is solved. Mark the thread as Solved too.
Bookmarks