Save Outlook Mail messages as .html format using RPA?

Hi all, I want to save my outlook mail message in .html format. I realise that when I tried to save it, i only found .msg format. Is there any way I can save it as .html format instead? like if i download it as .msg format, can i convert it to .html format with RPA?
Pardon me for my lack of knowledge…

1 Like

Hi,

You can use Save as option by opening the outlook mail separately and change the format while save it.

If you are looking for different option, let us know how you are saving your mails as .msg format now.

1 Like

Hi, I tried to use this method to save into .htm format, but somehow when it save, it show weird texts and some parts are missing… I don’t know where went wrong… this method works for .eml though.

1 Like

this is part of the weird text I receive. I can’t show the entire file because it is confidential… sorry about that

Hi @sharon

Is System.Net.Mail.Message in for each item type

Thanks
Ashwin S

Hi, yup it is system.net.mail.message

@sharon

Use below code in activity at For each

item.Headers(“HTMLBODY”)

mail.Headers(“HTMLBODY”)

hi @amaresan, do you mean replace mail with item.Headers(“HTMLBODY”) and replace folder with mail.Headers(“HTMLBODY”)?

@sharon

Keep your for each Properties & format as same

In write line … wrote below code

mail.Headers(“HTMLBODY”).tostring

it will return html format of your email body…you can store at one string

@amaresan
but this will just show the html in message box. The purpose of my message box is just to show that the program is running.

@sharon

write in notepad and save as .htm

@amaresan hmm no… it doesn’t work, if I save into notepad then convert to html, the entire table format will be lost… and all the words are scribbled up.

Why not save the mails to .eml file format? It works very well and comes without any programmings.

uhm I need to upload the message to a web which only reads html format

Ok then take this one: https://www.zamzar.com/convert/eml-to-html/

Is there any other ways…? the email I am converting is actually very confidential…

You can also open the eml files in the browser my friend. I don’t see any valid scenario where a html mail is better then the eml file.

Just take the eml and it’s totally fine. Atherwhise find a converter. You find this under Save Mail Message.

it is for some necessary purpose…

Then look for a converter or so. Or just write it on your own. It’s pretty easy. https://go.uipath.com/component/mail-message-converter