How to send back MS word cursor focus on current document after click in Task Pane
Asked Answered
W

1

10

I have developed a Word Add-in using word java script API. When i click in Task pane to do some action the cursor focus removes from current document, i am not able to edit the document until click back on the document. Please advice me how i can set back cursor focus back to current document when doing some actions in Task Pane.

Thanks.

Wendiewendin answered 6/10, 2016 at 5:18 Comment(2)
Just for the record: As @JuanBalmori stated it's currently not possible for Office Add-ins. For legacy COM or VSTO add-ins you can use a workaround involving sending an F10 keystroke twice to the main window. This will put the focus back to the main document: System.Windows.Forms.SendKeys.SendWait("{F10}"); System.Windows.Forms.SendKeys.SendWait("{F10}");Paederast
In now times is it possible or not or any event for get focus on document after click on taskpane?.Virgate
I
8

This is not possible to do today. The user needs to click back in the document so it gets the focus.

Internecine answered 6/10, 2016 at 21:24 Comment(4)
On windows desktop the user may of course use alt+w instead of clickingIndoctrinate
Has there been any progress on this?Rephrase
There is still no API to achieve this. other than the user clicking on it or navigating back to the document as suggested in the comment above from Arne.Internecine
Currently, Is it possible to set focus from the task pane to MS word document on a button click in the task pane?Virgate

© 2022 - 2024 — McMap. All rights reserved.