JannetteChristie
Board Regular
- Joined
- Dec 14, 2015
- Messages
- 127
- Office Version
- 365
I have the following code, but I am struggling to get the final part done. THe email body is blank and I cannot work out what I am doing wrong.
Sub SendOutEmail()
Dim rng As Range
Dim rngAddress As String
Dim OutApp As Object
Dim OutMail As Object
Dim PNGFile As String
Dim SheetToSend As String
Dim Subject As String
Dim EmailBody As String
Subject = ActiveSheet.Range("EmailSubject")
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set rng = Nothing
Set rng = Sheets("Spec Details").Range("ReportLayout")
Call HideBlankRows
Rows("1:99").Hidden = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.to = "" _
& "sales@dutypoint.com; "
.Subject = Subject
.HTMLBody = "<span style='font-size:10.5pt; font-family:arial' ><br /><br />" _
& "<img src='" & PNGFile & "'<br /><br />" _
.Display
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Hope someone can help.
Sub SendOutEmail()
Dim rng As Range
Dim rngAddress As String
Dim OutApp As Object
Dim OutMail As Object
Dim PNGFile As String
Dim SheetToSend As String
Dim Subject As String
Dim EmailBody As String
Subject = ActiveSheet.Range("EmailSubject")
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Set rng = Nothing
Set rng = Sheets("Spec Details").Range("ReportLayout")
Call HideBlankRows
Rows("1:99").Hidden = False
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.to = "" _
& "sales@dutypoint.com; "
.Subject = Subject
.HTMLBody = "<span style='font-size:10.5pt; font-family:arial' ><br /><br />" _
& "<img src='" & PNGFile & "'<br /><br />" _
.Display
End With
On Error GoTo 0
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
Hope someone can help.