Hi
Can anyone help me to include html text before the screenshot in email.
The below code is to attach the screenshot but the email text coming after the screenshot and not html. I tried several code to include the html body before the screenshot but no success.
Sub picture()
Dim OutApp As Object
Dim OutMail As Object
Dim r As Range
Set r = Range("A1:B30")
r.Copy
Dim P As picture
Set P = ActiveSheet.Pictures.Paste
P.Cut
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = ThisWorkbook.Sheets("Sheet2").Range("B1").Value
.CC = ThisWorkbook.Sheets("Sheet2").Range("B2").Value
.BCC = ThisWorkbook.Sheets("Sheet2").Range("B3").Value
.Subject = ThisWorkbook.Sheets("Sheet2").Range("B4").Value
.Body = Sheets("Sheet2").Range("B5").Value
.Display
Application.SendKeys "(^v)"
End With
On Error GoTo 0
OutApp.Session.Logoff
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
Bookmarks