Hello Everyone, I’m a beginner in UI Path and I have been trying my hands on Email Automation. I wanted to Create a Bot which should get triggered when a mail with a specific subject line is received in Inbox.
As per the workflow, the Bot should wait till it gets the mail with required subject line and once it does, it should show me the Subject of the obtained mail.
Due to some reason, I’m getting this error saying “Complier error(s) encountered processing expression “message.Subject”. Option Strict On disallows late binding.”
then select the “For Each” activity, go to the right pane and change the “TypeArgument” dropdown to “System.Net.Mail.MailMessage” (using Browse for types)
@theo500@David_Johnston chaging it to string and [quote=“theo500, post:7, topic:5067”]
“For Each” activity, go to the right pane and change the “TypeArgument” dropdown to “System.Net.Mail.MailMessage” (using Browse for types)
[/quote]
Solved my problem. @theo500 If possible can you please explain why it was required to change the argument type.
For Each activity does not now what kind of data the collection contains hence it will automatically “see” each item from the collection as a (generic) Object ; blocking the access to the MaiMessage properties.
changing the TypeArgument you explicitly tell UiPath to treat each item from the collection as a MailMessage hence giving you direct access to its properties and methods (subject, body etc.)
I’m an starter with UIpath. I try to make the course level One. In practice excersize 3 i have some troubles. When i build to robot, it gives my the error Compiler error encoutered processing expression “Row (“First”)” impicite conversions not allowed by the option strict on.
@l.tersluijsen It means you need to convert the variable to a different datatype in order to use it. UiPath is basically saying: You’re trying to use this variable as being one datatype, while at that moment it actually is another datatype. This commonly happens when you’re trying to write out an integer, in that case you’ll have to add the method .ToString to allow you to use it as a string.