How can I check the names of multiple attachments files of outlook mail

I am currently making a process to find the target emails by the file name of the attached files. However, I can’t find the way to judge by the file name of the attached file.

The conditions are as follows.
1, Sometimes the emails come in with no attachments.
2, There are two or more attachments, and sometimes there are unrelated attachments.
3, The name of the target attachment never changes and csv files.

So, what I want to do is
1, I want to check if there is an attached file at the mail.
2, I want to loop through multiple attachments.
3, I want to check the name of the looped attachment with the condition of If Activity.

I know how to get just one attachment file name, but I don’t know how to loop and check attachment file names.

The figure is just an image. As you see the outlookMails Type Argument is System.Net.Mail.MailMessage.
If there is a good way to check the name of the attached file, please let me know.

Thank you for reading.

@Kirigirisu_Coin

Check below for your reference

I hope this may help you

Thanks

1 Like

It’s very simple and easy to read.
Thank you very much.

1 Like

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