Link to home
Start Free TrialLog in
Avatar of newbie46
newbie46

asked on

Using vba from Access 2007, how do I bold text and change font size in email generated?

Dim objOL As Object
Dim objMail As Object
Set objOL = CreateObject("Outlook.Application")
Set objMail = objOL.CreateItem(olMailItem)

strBody = "Attached, please find a copy of the " &  NameofCompanyBolded & _
" letter for your review, and an electronic version of the Questionnaire.  A paper copy of these documents is also being sent to you." & vbCrLf & vbCrLf & _
"Please let me know if you have any questions."

objMail.To = strTo
objMail.CC = strCC
objMail.BCC = strBcc
objMail.Subject = strSubject
 
'Display Email
objMail.Display

objMail.body = strBody & objMail.body & vbCrLf & AfterSignatureCCs

Questions:
1) How do I display NameofCompanyBolded bolded?
2)  How do I set the font of the email text to Calibri 11 pt.?

When I use objMail.HTMLbody = "<b>" & text & "</b>" , the text is bolded, but then the carriage returns (vbcrlf) do not work.
ASKER CERTIFIED SOLUTION
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of newbie46
newbie46

ASKER

Thank you!
Sorry, closed it too quickly.
What about
2) How do I set the font of the email text to Calibri 11 pt.?

FWIW:
 IIRC, Calibri is not a standard font.. Unless the recipient is on a device  with Office installed they may not have the font installed.

I stick to generic fonts that are also smartphone friendly.