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")
Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 122.9K 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

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.