Arun Thoras
Arun Thoras

Reputation: 37

How to Bold or color text on auto email body from Excel VBA

I am sending mail linked to Excel data. i need to bold and red only few words and i am trying and i am not able to do it. Hope someone from here can help me out. Cells(i,13) has to get bold and Red when i am sending.

toList = Cells(i, 4) 'gets the recipient from col D

    eSubject = "Request for KBR transport to " & Cells(i, 2) & " on " & Format(Cells(i, 3), "dd-mmm-yy")
    eBody = "Dear " & Cells(i, 1) & vbCrLf & vbCrLf & "Can you please arrange KBR Transport for below PASSENGERS." & vbNewLine & vbNewLine & _
    " " & Cells(i, 13) & vbNewLine & vbNewLine & _
    " " & vbNewLine & vbNewLine & _
        "Full Name      :  " & Cells(i, 6) & vbNewLine & vbNewLine & _
        "Nationality    : " & Cells(i, 7) & vbNewLine & vbNewLine & _
        "Departure/Arrival  Date : " & "" & Format(Cells(i, 8), "dd-mmm-yy") & vbNewLine & vbNewLine & _
        "Airline        : " & Cells(i, 9) & vbNewLine & vbNewLine & _
        "Flight Number  : " & Cells(i, 10) & vbNewLine & vbNewLine & _
        "Departure/Arrival Time : " & Cells(i, 11) & vbNewLine & vbNewLine & _
        "Escort required: " & Cells(i, 14) & vbNewLine & vbNewLine & _
        " " & vbNewLine & vbNewLine & _
        "                   Contact Number: " & Cells(i, 12) & vbNewLine & vbNewLine & _
        " " & vbNewLine & vbNewLine & _
        "Please confirm pick up time and availability." & vbNewLine & vbNewLine ##

Upvotes: 0

Views: 2690

Answers (1)

Nathan_Sav
Nathan_Sav

Reputation: 8531

Use HTML body instead, then you can use the HTML <b> and <font> tags. It may suit better as you can use a HTML <table> for the data displayed also.

Upvotes: 2

Related Questions