How can I get the Range ("b37") to print as bold in an e-mail when I run the macro@

Neil Fenwick 0 Reputation points
2023-03-14T20:37:01.6833333+00:00
         .Body = "Dear Sirs" & vbCr & vbCr & "Please find attached the Umpires Report Form for the match indicated." & vbCr & vbCr & "Should you require any further information then please don't hesitate to get in touch." & vbCr & vbCr & "Kind regards," & vbCr & Range("a37") & vbCr & "For and on behalf of" & vbCr & Range("b37")
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,619 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,656 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 114K Reputation points
    2023-03-15T19:48:12.18+00:00

    Try something like this:

    .BodyFormat = olFormatHTML
    .Body = "Dear Sirs<br/><br/>Please find attached the ...<br/><br/>" & "For and on behalf of <br/><br/> <b>" & Range("b37") & "</b>"
    

    If this concept works, the values of the ranges must be escaped according to HTML rules to avoid incorrect formatting.

    1 person found this answer helpful.
    0 comments No comments