Problem identifying PDF attachments


Hi guys,

I am currently trying to extract a large maildump using UIPath. The idea is to use ‘Get Exchange Mail Messages’ to get all messages and then use the ‘add data row’ for each mail to input it into a datatable, which is then used to ‘append range’ into an Excel sheet.

I have two issues:
Firstly, I want three columns in my Excel sheet. Currently mail.From and Mail.To makes up two and are working fine. However, I also want to have a boolean value of whether there was a .pdf attached to the email, which I have been unable to extract. Do you know how to do this? The other two columns i got from using the ‘add data row’.

Secondly, when I extract the data into an Excel sheet, it always stops at 1000 mails/rows? It will not extract more mails/rows, and I have not been able to determine why it blocks it like this. Any ideas?

Thanks in advance,


@Jloder For first issue u can refer below link, i think it will you.


Thanks Manjuts90,

It is still not working though. It returns a false for me every time even though it the mails have .pdfs attached. Do I have to do something to the condition: (item.Attachments.Where(Function(x) x.Name.Contains(".pdf")).Count > 0) ? Do the x’es need to be replaced?



@Jloder I just checked the workflow it is working fine for me.


Try (item.Attachments.Where(Function(x) x.Name.ToLower.Contains(".pdf")).Count > 0)
x doesn’t need to be replaced