Here's the documentation for the NewMail Event. With that you should be able to make it so your code executes every time a new Mail is recieved. https://learn.microsoft.com/en-us/office/vba/api/outlook.application.newmail