missrutele
New Member
- Joined
- Nov 17, 2017
- Messages
- 10
Hey,
I have this code. But I need to bold text from cell K14 and change color of cells K21-K25.
How can I do that?
Please help
Sub SendMail()
'SendEmail Macro
'
'
Dim outlApp As Outlook.Application
Set outlApp = CreateObject("Outlook.Application")
Dim outlMail As Outlook.MailItem
Set outlMail = outlApp.CreateItem(outlMailItem)
outlMail.To = Range("K5") ' <-- Put email of the recipient here
outlMail.Subject = "DOVANOS - fejerverkai Naujiesiems!"
outlMail.CC = Range("K6") ' <-- Put email of 'copy to' recipient here
outlMail.Body = Range("K8") & vbLf & vbLf _
& Range("K9") & vbLf & vbLf _
& Range("K10") & vbLf & vbLf _
& Range("K11") & vbLf & vbLf _
& Range("K12") & vbLf & vbLf _
& Range("K13") & vbLf & vbLf _
& Range("K14") & vbLf & vbLf _
& Range("K15") & vbLf & vbLf _
& Range("K16") & vbLf & vbLf _
& Range("K17") & vbLf & vbLf _
& Range("K18") & vbLf & vbLf _
& Range("K19") & vbLf & vbLf _
& Range("K20") & vbLf & vbLf _
& Range("K21") & vbLf & vbLf _
& Range("K22") & vbLf & vbLf _
& Range("K23") & vbLf & vbLf _
& Range("K24") & vbLf & vbLf _
& Range("K25") & vbLf _
outlMail.send
Set outlApp = Nothing
Range("D12").Value = Range("D12").Value + 1
End Sub
I have this code. But I need to bold text from cell K14 and change color of cells K21-K25.
How can I do that?
Please help
Sub SendMail()
'SendEmail Macro
'
'
Dim outlApp As Outlook.Application
Set outlApp = CreateObject("Outlook.Application")
Dim outlMail As Outlook.MailItem
Set outlMail = outlApp.CreateItem(outlMailItem)
outlMail.To = Range("K5") ' <-- Put email of the recipient here
outlMail.Subject = "DOVANOS - fejerverkai Naujiesiems!"
outlMail.CC = Range("K6") ' <-- Put email of 'copy to' recipient here
outlMail.Body = Range("K8") & vbLf & vbLf _
& Range("K9") & vbLf & vbLf _
& Range("K10") & vbLf & vbLf _
& Range("K11") & vbLf & vbLf _
& Range("K12") & vbLf & vbLf _
& Range("K13") & vbLf & vbLf _
& Range("K14") & vbLf & vbLf _
& Range("K15") & vbLf & vbLf _
& Range("K16") & vbLf & vbLf _
& Range("K17") & vbLf & vbLf _
& Range("K18") & vbLf & vbLf _
& Range("K19") & vbLf & vbLf _
& Range("K20") & vbLf & vbLf _
& Range("K21") & vbLf & vbLf _
& Range("K22") & vbLf & vbLf _
& Range("K23") & vbLf & vbLf _
& Range("K24") & vbLf & vbLf _
& Range("K25") & vbLf _
outlMail.send
Set outlApp = Nothing
Range("D12").Value = Range("D12").Value + 1
End Sub