For Each Email not iterating in Desktop Outlook

I created a very basic script - /Use Desktop Outlook App and gave it my email address. Next I nested ‘For Each Email’ and attempted to read the first 5 ‘unread’ emails. Nested in the ‘For Each Email’ and pointed it to a subfolder. I nested a message box in the ‘For Each Email’ to show me the Subject. Basic stuff, but when I run, I get only the first email five times in a row whether its been read or not.
What could be wrong? Also, I must have the Outlook app open with the folder I want to interrogate open as well.

Hi,

We can use CurrentMail variable as item of mails in ForEachEmail. So can you try to set [CurrentMail] Subject instead of EmailSubject?

Regards,

1 Like

As Yoichi said, in the message box use from the + menu the current mail option:

1 Like

Thank you! that addressed it!

Sorry I am so slow to reply, Covid-19 took me right after I posted and this is my first day back. Feeling better but I would never suggest anyone risk it. Take every precaution, please.

2 Likes

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