-4

Can anybody please suggest how to handle Cut,Copy and Paste events in Word/Excel using C#? (winform). I want to deny copy/paste events when i'm running my app and after that opening word/excel

  • I don't think you can catch the Word/Excel events. You can however do it for the whole system but that will impact other applications aswell. – Luud van Keulen Sep 27 '16 at 08:30
  • I don't think you will be able to prevent those events. If you're looking to secure documents against copying, see what Office itself can do or use PDF. – MarioDS Sep 27 '16 at 08:30
  • 1
    Wouldn't be much of a word processor if you deny copy/paste –  Sep 27 '16 at 08:30
  • I think what you can do is to [monitor the ClipBoard events](http://stackoverflow.com/questions/621577/clipboard-event-c-sharp) through your Winform project, but it will affect all application. – Bolu Sep 27 '16 at 08:31
  • I thinking about to use hook prevent copy/paste events – ngoc chau nguyen Sep 27 '16 at 08:33

1 Answers1

0

Only way to do that is to open Word in sandbox application or some frame and remove these shortcuts in sandbox-frame-enviroment. Also this word isntance SHOULD have addon/app/addin that disables UI buttons for that. There is not other way because events belongs to system Clipboard not to word and blocking them can make whole system break.

Sebastian 506563
  • 6,980
  • 3
  • 31
  • 56