I am looking for a macro in MS Outlook which will run every time a file is attached to an email being sent from the system. I would like the macro to first check if the file is an excel workbook. If it is an excel workbook, open the workbook in background and search for a specific keyword in the workbook which uniquely defines the workbook. If it is able to find the keyword in the workbook, then it must prevent attaching the file and immediately send an email alert to a predefined email address saying that this confidential file was trying to be attached by the user.
This macro will be used to prevent the user from sending confidential data to others over email.
Please do help me with this.
Thanks in advance.