Hello,
I am new to programming and looking for help in the below code.
In the below code it opens the outlook email, getting subject & body of the mail however I am looking for certain rows which has NO in either column M, N or O to be the body of the email.
It need to send an email to email defined in Column P of that row.
I hope the following code needs to be modified.![]()
Sub EmailMe() Dim oEmail As Object Dim oMailItem As Object Dim sRcpt As String Dim sSbjct As String Dim sMsg As String sRcpt = "abc@gmail.com" sSbjct = "Here is the network number " & Range("A1") sMsg = sSbjct Set oEmail = CreateObject("Outlook.Application") Set oMailItem = oEmail.CreateItem(olMailItem) With oMailItem .Recipients.Add sRcpt .Subject = sSbjct .Body = sMsg .Display End With Set oMailItem = Nothing Set oEmail = Nothing End Sub
Thanks in advance for your help!!![]()
.Body = sMsg
Regards,
Humac
Bookmarks