How to bold one line in email sent via vba with outlook

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
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
Hi,

I think you will need to use the HTML tags to format your mail.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,266
Messages
6,123,962
Members
449,137
Latest member
yeti1016

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top