2

I am trying to trigger code to run on the click of an image within Excel using Office JS.

So far I am giving the image a name in the Name Manager and then I'm using the onWorksheetCollectionSelectionChange() event handler to look for that name.

The name is found when I select any cell or range, but when I select the image itself, the onWorksheetCollectionSelectionChange() method is not called. It doesn't seem like an image can be included within a cell and share its properties, or can it?

Is there a way to achieve this without using VBA?

Thanks!

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45

1 Answers1

2

Could you try listening Excel.Shape.onActivated on the image and see if it works for you?

chiz-ms
  • 136
  • 1