I have now updated the code and can confirm it's working, thanks very much.
However I do have another issue.
I have a rule set up in Outlook to copy some emails from the shared account into a sub-folder in my account.
The rule is working but it copies the email before it has removed the...
On my work PC I have two outlook accounts, my account and a shared account.
All external emails that we receive have an annoying note added to the subject line which is basically a warning that it's an external email.
I used to have a script set up with a rule but for some reason the 'run a...