Thank you for your reply.

Indeed I can move an email to the folder using rules but there is more processing I need to do with that email once it's moved to the folder which is why I started the macro with moving it to the folder and then I need to write the code for the rest of the process.

It's the first time I write an Outlook macro: I understand that for the macro to run automatically on outlook I need to use the rule and the script must have the (item As MailItem) parameters in order to be linked to a rule. How would your code below run automatically in outlook since there are no input parameters to your procedure? I would only be to run it manually.

Thank you very much.