I am creating a macro that writes and sends emails based on information in an excel worksheet. I am using the following line to replace different placeholders in an outlook template:
I need to add a new line of this code, but I need to add an if statement that determines if cell 1 is greater than cell 2 and if cell 2 is greater than cell 3. If it's higher, then I need to replace the placeholder with "higher" and make it bold and green. If it's lower then I need to replace it with "lower" and make it bold and red. I can do the if statement, but I am not sure how to go about making the text bold and colored based on the outcome of the if statement. Can somebody help me out with this? Thanks!
Code:
MyItem.HTMLBody = Replace(MyItem.HTMLBody, "PLACEHOLDER", FormatType(Range("J6"), 0))