WindowSelectionChange method for a new line RRS feed

  • Question

  • Hi All, 

    This method, 

    public void application_WindowSelectionChange(Word.Selection selection)

     displays "changed" when i press the tab key between table columns but not when i press enter key when word by default adds a bullet in a new line if the previous line has a bullet. Can anyone tell me why ? Iam trying to eliminate key board hooks and threads by using this method ,as using them causes word to crash frequently.Any help is much valued as I'am trying  to increase the performance by eliminating keyboard hooks and threads.



    Tuesday, February 24, 2015 12:36 PM


  • Hi Apoorva,

    For the Application.WindowSelectionChange event, it occurs when the selection changes in the active document window.

    Based on my test, type text in the document won’t occur selection change event. When press enter key, it types text too (Chr(13)), so it won’t occur selection change event.

    For your requirement, I think you need to use windows API to achieve that (SetWindowsHookEx).



    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Wednesday, February 25, 2015 6:58 AM