Quote Originally Posted by gmayor View Post
Why don't you use the script to move the message after you have processed it?
Hi Graham,

The order of events is that the Microsoft rule is supposed to move the e-mail from arrival in my Inbox to a sub-folder called "MyFolder". The next step in the rule is that the script (Public Sub RunMacroItem As Outlook.MailItem) gets called and moves any attachments found in E-mails in "MyFolder".

What is actually happening is that for some reason the Script is running before the e-mail has arrived in the "MyFolder" subfolder.

So, when the new e-mail arrives, the rule runs, the script gets kicked off and can't find any e-mails in the "MyFolder" subfolder. Then the e-mail arrives in the subfolder.

Just as a note when I manually put an e-mail in the MyFolder subfolder and run the VBA it works perfectly.

I hope I have explained this properly.

Thanks,

Des