Excel to Outlook email with formatting

  • I use a series of formulas and user inputs to generate a series of text entries which will then comprise the body of an email. This is the code that is working for me at present:

    In the for loop, there are some lines that I would like to appear as bold text in the email. I can detect those lines easily enough; it's formatting them in Outlook that is the challenge. Any suggestions?

  • Re: Excel to Outlook email with formatting

    Try using the HTMLBody property of the MailItem object. So, for example, try adapting the following...

    1. EmailBody = "<p>This paragraph contains <span style=""font-weight: bold;"">bolded</span> text.</p>"
    2. EmailBody = EmailBody & "<p>And here's another paragraph.</p>"
    3. OutMail.HTMLBody = EmailBody