I would like to run a certain procedure (macro) when a user is trying to paste an image on a sheet of my workbook.
If the user would be just pasting a simple text into the sheet of a non-shared workbook, then I could easily detect the event via the Workbook_SheetChange of the Worksheet_Change (with some tricks to understand that it was a "Paste" event and not a simple text manual typing).
However, here the complexity is added by two factors:
- If I paste an image, the event
Worksheet_Changeis not triggered even when the workbook is not shared; - In shared workbooks is impossible to paste images. Hence, Excel's native's code seems to stop the action even before the event could be detected.
Does anyone have any idea (even including Windows API to intercept clipboard actions)?