Format body of email sent by Excel VBA -
i've seen few questions topic none specific/similar scenario.
the body of email received via input in userform. want format calibri size 11. i've tried few methods , although code doesn't error out, when email populated, still times new roman 12.
the first body line calls text box , i've attempted add formatting. second line necessary maintaining line breaks.
sorry basic question, i'm still learning!
.to = username .cc = txtcc .bcc = txtbcc .importance = importance .subject = txtsubject.value .htmlbody = "<p style='font-family:calibri;font-size:14.5'>txtbody.value</font></p>" .htmlbody = replace(userform1.txtbody.text, vbcrlf, "<br>")
actually, i'm not sure if can here tipps:
why write html body , override text userform.textbox?
instead try like:
.to = username .cc = txtcc .bcc = txtbcc .importance = importance .subject = txtsubject.value adaptedtext = replace(userform1.txtbody.text, vbcrlf, "<br>") .htmlbody = "<p style='font-family:calibri;font-size:14.5'>" & adaptedtext & "</font></p>"
Comments
Post a Comment