
07-31-2012, 12:56 PM
|
|
Newcomer
|
|
Join Date: Jul 2012
Posts: 1
|
|
Making text in e-mail bold and underline in VB Code
|
Hi there,
I'm looking to make the text in the e-mail that is automatically populated from my excel document be bold. I only want part of it to be bolded though. I'm sure this is a very simple task; however, I'm not able to figure it out. I've copied my code below.
Quote:
Sub Mail_with_outlook1()
'For mail code examples visit my mail page at:
'http://www.rondebruin.nl/sendmail.htm
Dim OutApp As Object
Dim OutMail As Object
Dim strto As String, strcc As String, strbcc As String
Dim strsub As String, strbody As String
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strto = "ron@something.abc"
strcc = ""
strbcc = ""
strsub = "Customers"
strbody = "Hi Ron" & vbNewLine & vbNewLine & _
"The total Customers of all stores this week is : " & Cells(FormulaCell.Row, "B").Value & _
vbNewLine & vbNewLine & "Good job"
With OutMail
.To = strto
.CC = strcc
.BCC = strbcc
.Subject = strsub
.Body = strbody
'You can add a file to the mail like this
'.Attachments.Add ("C:\test.txt")
.Display ' or use .Send
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
|
|
|