No i include Many of cells in my code but i still don't full any cells with data But I include a value in cell under activity and task and value inside cells under note And the name of the receivers with offset and this is a screenshot from output emailI reviewed your workbook and code. The email macro does create an email but it does not include anything
from the worksheet ????
What line are you seeking to have the edits applied ?
Did you intend to include any data from the worksheet to be included in the email ? If so, where is that code ?
Yes exactlyOk ....
Which line are you speaking of that should be of a different color ? Is it : STANDARDIZATION & COMPLIANCE ?
With CreateObject("Outlook.Application").CreateItem(0) '0 will create a new email item
If Target.Cells.Count > 1 Then Exit Sub
.To = myToAdd
.CC = "tamer.elgindy@Test.com"
.Subject = "You Have a new ( Activities / Tasks / Items )" & " " & Target.Offset(0, -3).Value & " " & "assigned to you"
.HTMLBody = "<HTML><BODY>" & "Dear," & " " & Target & "<br></br><br></br>" & "You Have a new ( Activities / Tasks / Items )" & " " & Target.Offset(0, -3).Value & " " & " with note :.." & Target.Offset(0, 1).Value & " " & "in month" & " " & Range("f1").Text & " " & ". assigned to you " & "<br></br>" & "Please follow up till have it Closed or assigned to the responsible ." & "<br></br><br></br><br></br>" & "Keep it up" & "<br></br>" & "<font face=""Times New Roman"" size=""2"" color=""blue""><i>""STANDARDIZATION & COMPLIANCE""</i></font>" & "</HTML></BODY>"
.display 'Change this to .Send
If Err Then
MsgBox "E-mail was not sent", vbExclamation
Else
MsgBox "E-mail successfully sent", vbInformation
End If
On Error GoTo 0
End With
no words can say how much i appreciate what you did for me this is not thanks this is appreciation thanks.
Use this :
Code:With CreateObject("Outlook.Application").CreateItem(0) '0 will create a new email item If Target.Cells.Count > 1 Then Exit Sub .To = myToAdd .CC = "tamer.elgindy@Test.com" .Subject = "You Have a new ( Activities / Tasks / Items )" & " " & Target.Offset(0, -3).Value & " " & "assigned to you" .HTMLBody = "<HTML><BODY>" & "Dear," & " " & Target & "<br></br><br></br>" & "You Have a new ( Activities / Tasks / Items )" & " " & Target.Offset(0, -3).Value & " " & " with note :.." & Target.Offset(0, 1).Value & " " & "in month" & " " & Range("f1").Text & " " & ". assigned to you " & "<br></br>" & "Please follow up till have it Closed or assigned to the responsible ." & "<br></br><br></br><br></br>" & "Keep it up" & "<br></br>" & "<font face=""Times New Roman"" size=""2"" color=""blue""><i>""STANDARDIZATION & COMPLIANCE""</i></font>" & "</HTML></BODY>" .display 'Change this to .Send If Err Then MsgBox "E-mail was not sent", vbExclamation Else MsgBox "E-mail successfully sent", vbInformation End If On Error GoTo 0 End With
i have another question if you please i want to insert a logo or a photo that will be hidden in hidden sheet to the email body after "STANDARDIZATION & COMPLIANCE" lineYou are welcome.
Merry Christmas !