Excel VBA: Is Open Workbook an Attachment
-
06-07-2019 - |
Question
Is it possible to tell if a workbook has been opened from an email attachment, rather than a drive/share?
Solution
From outlook files are opened to a temp dir on your drive, you could check to see if its in that folder, VBA Source as follows
IsAttachment = (InStr(1, ThisWorkbook.Path, "Temporary Internet Files", vbTextCompare) > 0)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow