Outlook Email body styles

Hi everyone could you please assist here, I have email body text, it was a plain text at first but now I want to make certain text bold, some with color.

Now this is what I have tried but it contains some errors.


Please try using create html content activity…it is simple to use and interactive. output of it can be used in email body



Hi @Anil_G
Alright thank you let me try it out

1 Like

hi @Anelisa_Bolosha

Try using the Send outlook Mail Messages activity and in the properties panel please tick the checkbox isBodyHtml and write your code in the body. I have attached screenshot for your reference.

Hope it helps!!


Hi @Anelisa_Bolosha

There are 2 ways you can do this,

  1. Try replacing Double Quotes (") with single quote(') in your Body, and vice Versa.
  2. Either you can use Double Quotes every where, just ensure to put “”" Triple Double Quotes consecutively to put a single double quote in string for example in the Style tag you would have to write something like

<p style="""font-size:14px; color:#FF0000;""">


I saved the html content in a variable then used it in the email body, please see below :

It throws this error


Are you attaching any file?looks like path provided is wrong…can you check please


Yes there is a file attachment

Hi @Anelisa_Bolosha ,

Try giving the full path of this file.

Because if it’s not in your Project’s local folder, the code wouldn’t be able to find it.
Try creating a Variable: in which you’ll be storing the full path of this excel file and then pass that filePath variable here in as an attachment.



If the file is present in project folder then give like this

Path.Combine(Environment.CurrentDirectory,"Credico_Report_" + year + Month + Day + ".xlsx")

And I hope the file name is proper

If it is in some other folder then change accordingly

Environment.CurrentDirectory will give the current project folder value

Hope this helps


It’s all good now thank you, I saw that I didn’t have ‘write range’ activity so it wasn’t creating the resulted excel file to be attached

1 Like


Glad the issue is resolved.Happy Automation


1 Like

This worked well and is very simple to edit, greatly appreciate it

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.