none
Is there any event to track Cursor Movement in Word?

    Question

  • Is there any event to track cursor movement in word?

    I need to detect the cursor position and depending on that i need to toggle some buttons on Ribbon. How can i track the movement of cursor with mouse or keyboard events?. I am developing my addin in C# for MS Word 2010. 

    Thanks,

    Siva.

    Monday, January 31, 2011 7:17 AM

Answers

  • Hi Siva

    The only thing Word provides is the WindowSelectionChange event. This won't trigger when the user types, but it will when the arrow keys, backspace, or the mouse is used to change the cursor location. It will also trigger when the user enters or leaves cells in a table, things like that.

    If you need more than that, you'll have to work with the Windows API.


    Cindy Meister, VSTO/Word MVP
    • Marked as answer by Bessie Zhao Tuesday, February 08, 2011 9:29 AM
    Monday, January 31, 2011 7:41 AM