I’m looking for a way to override Undo (CtrlZ) / Redo (CtrlZ) commands in Word 2010 (C# + VSTO).
Is it possible ?
I managed to catch Copy / Paste commands, but it seems that Undo / Redo are not commands in RibbonUI like Copy / Paste.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you want some control over what happens with Undo/Redo, check out Microsoft.Office.Interop.Word.UndoRecord. Here’s the thread where I learnt to use it properly!
If you want to catch the actual keystrokes, then you’re in Windows API land. So generally, Google terms related to that. But message-hooks-in-add-ins may be useful to you.