newbie46
asked on
How do I change font within email generated by vba?
Dim objOL As Object
Dim objMail As Object
Set objOL = CreateObject("Outlook.Appl ication")
Set objMail = objOL.CreateItem(olMailIte m)
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
I closed this question prematurely without the following question having been answered.
Questions:
1) How do I set the font of the email text to Calibri 11 pt.?
Dim objMail As Object
Set objOL = CreateObject("Outlook.Appl
Set objMail = objOL.CreateItem(olMailIte
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
I closed this question prematurely without the following question having been answered.
Questions:
1) How do I set the font of the email text to Calibri 11 pt.?
<No Points wanted>
HTML like this:
<p style="font-size:7pt; font-family:calibri;">This is Calibri Text 7 point</p>
Will produce what you are asking for: Calibri font at 7 points
HTML like this:
<p style="font-size:7pt; font-family:calibri;">This
Will produce what you are asking for: Calibri font at 7 points
So to do a complete block of text with line breaks, <br>, would start out like this:
<p style="font-size:7pt; font-family:calibri;">This is Calibri Text 7 point on line 1<br>This is Calibri Text 7 point on line 2</p>
<p style="font-size:7pt; font-family:calibri;">This
ASKER
boaq2000,
Where does the <p style .... go? Is it added as seen below?
objMail.HTMLbody = <p style="font-size:7pt; font-family:calibri;">This is Calibri Text 7 point</p> &
strBody & objMail.body & "<br>" & AfterSignatureCCs
Where does the <p style .... go? Is it added as seen below?
objMail.HTMLbody = <p style="font-size:7pt; font-family:calibri;">This
strBody & objMail.body & "<br>" & AfterSignatureCCs
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
^
Yes, use Nicks syntax.
My post was just and example of a short string...
;-)
Yes, use Nicks syntax.
My post was just and example of a short string...
;-)
http://www.pcreview.co.uk/forums/specify-font-name-face-using-vba-macro-word-t3845020.html