Email Formatting

B

bodhisatvaofboogie

I was wanting to add some bold highlighting to the body of an e-mail that I'm
automatically generating with this bit of code. Now I know that there is no
way to do formatting within the strbody, as it is just a string of text.
However is there some way to do that if I were to put the text into the .Body
= Spot??? Specifically I want the CURmonth to be bolded within the body,
what might that look like? Thanks!!!!

Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

CURmonth = CStr(MonthName(Month(Now) - 1))
strbody = "Text " & CURmonth & "Text"
On Error Resume Next
With OutMail
.To = e-mail address
.CC = ""
.BCC = ""
.Subject = "TEXT"
.Body = strbody
.Attachments.Add ("FILENAME")
.Display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
 
N

ND Pard

Try .HTMLBody instead of .Body

Then use HTML coding to bold the desired text.
Example: The following word <b> is </b> in bold.

Good Luck.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top