trap copy and paste

Started by perry59, December 17, 2021, 05:30:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

perry59

I am using the application.isinscope function to trap copy and paste events and for the most part it works fine. There is one event I can't seem to find though and that is for when a user holds down the control button and drags a shape to copy it. I thought it might be the visCmdUFEditDuplicate constant, but that's not doing the trick.
The following two snippets work as expected:
If Globals.ThisAddIn.Application.IsInScope(1022) = True Then 'visCmdUFEditPaste
  MsgBox("pasted " & shapeName)
End If
If Globals.ThisAddIn.Application.IsInScope(1246) = True Then 'visCmdDropOnPage
  MsgBox("dropped " & shapeName)
End If


This one never gets called: (what does it do?)
If Globals.ThisAddIn.Application.IsInScope(1024) = True Then 'visCmdUFEditDuplicate
  MsgBox("duplicated " & shapeName)
End If


anyone know how I can catch it when a user copies a shape by selecting one on the page, holding CTL and dragging it?
Thanks
Perry
what, me worry?

perry59

I found this works for copying via drag:
'copy by dragging
If Globals.ThisAddIn.Application.IsInScope(1184) = True Then 'visCmdDragDuplicate
    MsgBox("drag duplicated " & shapeName)
End If
what, me worry?