none
Handling "Undo" button in Word 2016 ribbon XML and the callback events in C# addin project RRS feed

  • Question

  • Hi,

    I need to control "Undo" button/gallery control  in Word 2016 desktop version like the RedoOrRepeat/Paste/Cut commands in Word ribbon.

    The redo and other commands fire back to my C# code using "onAction" when ever user press Ctrl +Y or Ctrl +C etc. but it does not fire back for Ctrl +Z.

    Tried with "<gallery idMso="Undo" onAction="ButtonClicked" />" but it does not fireback to my C# addin code.

    Thanks in advance.

    Monday, August 13, 2018 9:50 AM

All replies

  • you could put a built-control in where you want or hide a built-control where it originally located, but you could not custom its other property, including its label, onaction event, etc...
    Tuesday, August 14, 2018 9:57 AM
  • Thanks for your reply.

    Setting the visibility is okay, but I am looking for onaction or any other event call back in C# Connect.cs so that I can customize the behavior of undo as per my need, I am wondering how MS Word does it, because Word also call some events which populated the list of gallery control of undo when we make any changes in the document, so do you think that WindowsSelectiobChange can help?, I also did try with low level hookcallback for keyboard and mouse but it created a mess and also slowing up the performance.

    Regards,

    Thursday, August 16, 2018 5:30 AM