9
votes

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.

1
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}");Dirk Vollmar

1 Answers

8
votes

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