Does your code reside in Excel or in Outlook? If in Outlook, you may have better luck asking in Outlook forum. As forum's focus is on Excel side of things.
As well, your requirement isn't very clear to me. Please detail step by step what the code should do. And post existing code (partial or attempt) using code tag. So we can follow some of the thought process.
i would like to write this code inside outlook.
I will tell you in brief, User was sending wrong attachment to the client. I have written code inside outlook, so whenever user use click on send button then my Macro get activated and start validating file name with subject line. if its matching email move out from inbox else it will show pop up
Now my client want to enhance requirement. here i need help