Link to home
Start Free TrialLog in
Avatar of rafavro
rafavro

asked on

Manipulating String colors in VBA

MS Access application generate emails.   Applications builds the email message body programmatically.  

dim messagebody, starttext, endtext as string
dim startdate as string

startdate =  'value assigned based by program logic'

Messagebody =  starttext & startdate & endtext

The requirement is to manipulate the font characteristics of the startdate field.  For example that field should appear in an alternate color and in bold.

Please advise
ASKER CERTIFIED SOLUTION
Avatar of [ fanpages ]
[ fanpages ]

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 [ fanpages ]
[ fanpages ]

Sorry... got the VBA correct, but not the HTML! :)

Please replace this line:

MessageBody = StartText & "<font color=red><bold>" & StartDate & "</bold></font>" & EndText

With:

MessageBody = StartText & "<font color=red><b>" & StartDate & "</b></font>" & EndText


Thanks.

BFN,

fp.
Hi Dan,

I believe my code addresses the question, and hence should be considered as an acceptable answer.

Thank you.

BFN,

fp.