I don't know anything about Outlook. I see a problem with finding an event that will trigger when opening an attachment (or more precisely - BEFORE opening an attachment). If you can find such an event, then the rest of the code should not be much of a problem anymore.
But maybe you need to do it differently. Why do you make the further operation of the code dependent on this line
CurrentName = ActiveWorkbook.Name
Perhaps it can be solved differently. But then we need to know the code that uses CurrentName.
Artik
Bookmarks