How to loop a "send back an email to it's initial sender" process depending on attachment contents in Outlook

Hello everyone. Please, help me

Process description:

  1. Get outlook mail from a folder. Every mail contains 1 Word doc inside, no limits for amount of mails, sender is random
  2. For each item in mailList - save Attachment.
    Each mail contains a word document with a table inside
  3. Get files in a folder via System.IO.Directory.GetFiles
  4. For each item in FileList I use get visible text and check if there is something inside the field of the table

What I am trying to do is to send back an email if there is nothing inside the field of the table. How should I make the process so I won’t miss the sender name? Can’t make loop for saving attachments and make check for each docx without missing that info atm

See these threads Im sure you will get a solution

It’s not necessary to have 2 For Each loops. Just open and read the attachment inside the first for each loop, and depending on the contents, send the reply.

1 Like

Worded, thanks a lot!

1 Like