Outlook mail.body doesn't work

Hey guys,

I really need your help, please :slight_smile:

I want to extract the body of any emails but it does not work as usually and I am afraid something changed with the new 2020 version.

What I did:

  1. Get Outlook Mail Message (as usual with everything needed)
  2. For Each Loop (ForEach item in strOutlookMailList (List ))
  3. Log Message: Log Level Info, Message: mail.body

But the third stip does not work :frowning:

Do you have an idea why? Thank you folks!

Cheers,
Developer Jack

Can you explain in more detail of what it is doing that shows it’s not working, like does it error or is it just empty?

I am not aware of any changes to 2020, but one thing I have done in the past to troubleshoot email extraction is to view Subject or From or other info, so you can see potentially what emails you are looking at.

It says, before I even could run in debug: "Compiler error(s) encountered processing expression “mail.body”. “Option Strict On” disallows late binding

I think it is not the 2020 verison. It does work at my own laptop

try adding .ToString
mail.Body.ToString

Also, sometimes if you have the wrong ArgumentType in the ForEach, this can happen. So ensure it is of MailMessage type.

1 Like

Thanks mate, that helped!!! :slight_smile:

I had in my properties still Object as TypeArgument…thank you!

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