Sub EMail_Outlook_Body()
Dim rng As Range
Dim OutApp As Object
Dim OutMail As Object
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set rng = Nothing
On Error Resume Next
Set rng = Sheets("1").Range("F2:F5").SpecialCells("F2:F5")
On Error GoTo 0
If rng Is Nothing Then
MsgBox "Error" & _
vbNewLine & "Error", vbOKOnly
Exit Sub
End If
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "
[email protected]"
.CC = "
[email protected]"
.BCC = ""
.Subject = "Test"
.HTMLBody = .RangetoHTML("F2:F5")(rng)
.Display
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks