Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to send email with specified bold/size/color/underline text format in Excel?

HTML body format can enrich the email and make it easy to read. This article is talking about sending an email with HTML format email body in Excel by adding bold, underline as well as specified size and color text format.

Send email with specified bold/size/color/underline text format with VBA code

Easily send email through Outlook based on fields of created mailing list in Excel:

The Send Emails utility of Kutools for Excel helps users sending email through Outlook based on created mailing list in Excel. See screen shot:

  • Create a mailing list with all needed mail fields and select them all.
  • Enable the Send Emails function and fill in your email body.
  • Send via outlook.

Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days. Download the free trial Now!

Send email with specified bold/size/color/underline text format with VBA code

Please apply below VBA code to send an email with specific HTML body format in Excel.

1. Press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.

2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Then copy below VBA code into the Code window.

VBA code: Send email with specific bold/size/color/underline text format in Excel

Sub SharePerformance1()
'Update by ExtendOffice 2018/3//5
    Dim xOutApp As Object
    Dim xOutMail As Object
    Dim xOutMsg As String
    On Error Resume Next
    Set xOutApp = CreateObject("Outlook.Application")
    Set xOutMail = xOutApp.CreateItem(0)
    xOutMsg = "<b>This text is bold</b><br/><span style=""color:#80BFFF"">Font Color</span style=""color:#80BFFF""><br />" & _
               "<u>New line with underline</u><br /><p style='font-family:calibri;font-size:25'>Font size</p>"
    With xOutMail
        .To = "Email Address"
        .CC = ""
        .BCC = ""
        .Subject = "Html format email"
        .HTMLBody = xOutMsg
    End With
    Set xOutMail = Nothing
    Set xOutApp = Nothing
End Sub


1) Replace the .Subject line with your own one.

2) Enter the recipient’s email address into the .To line.

2) In the xOutMsg line:

2.1) <b>…</b> can make your text bold;

2.2) <span style=""color:#80BFFF"">...</span style=""color:#80BFFF""> is the text color

2.3) If you want to restart a new line, please add <br/> before the new line text;

2.4) Underline your text with <u>…</u>;

2.5) And change your text size by <p style='font-family:calibri;font-size:25'>…</p>.

3. Press the F5 key to run the code. Then email with specified HTML format body is opening. Please click the Send button to send it.

Office Tab - Tabbed Browsing, Editing, and Managing of Workbooks in Excel:

Office Tab brings the tabbed interface as seen in web browsers such as Google Chrome, Internet Explorer new versions and Firefox to Microsoft Excel. It will be a time-saving tool and irreplaceble in your work. See below demo:

Click for free trial of Office Tab!

Office Tab for Excel

Related articles:

Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 300 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.