Change font color of a certain string

needhelptdot

New Member
Joined
Sep 8, 2011
Messages
13
I'm trying to write a code that will extract information from an excel table and copy it into an email in outlook. It's basically a checklist and if its checked of, the excel sheet will say '(check)' in the column. The outlook email should have the label name and if that label has been checked from the userform, it should say (check) beside it in the email. Example:

Excel...

Column 1 Column 2 Column 3
1. Copy file (check)
2. delete file

Outlook Email...

(check) 1. Copy file
2. Delete file

So when the email says (check)...I was wondering if just that string could be changed to RED font. Any ideas?
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
If this is for the body of an email you could do it but you would need to use HTML.

You would also need to alter any code you have for the email to use HTMLBody.
 
Upvote 0
Yeh this is for the body, and I tried using .HTMLbody = w/e but then that means I have to recode my entire strBody to suit the formatting. Any other ways I could do this?
 
Upvote 0
Not that I know of and I'm not sure you'll need to recode everything.

You just need to add the appropriate HTML tags and that should be straightforward for what you want to do.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top