Mawa1976
Feb 23, 2024Brass Contributor
Status:
New
Set selection AND focus back to document after action in MS-Word web-addin pane
in our Word web-addin, a user can click a button to apply a style in the activedocument. Before the user can continue typing, he must first click in the document. it would be great if we can call ...
Mawa1976
Mar 05, 2026Brass Contributor
It seems this has been honoured:
await Word.run(async (context) => {
if (Office.context.requirements.isSetSupported("WordApiDesktop", "1.4")) {
context.document.activeWindow.setFocus();
}
);
teoddroidd
Mar 05, 2026Copper Contributor
Thank you, that's a great start! But that's only half the story, as it only works on Word Desktop. Word Online doesn't support this yet.
Our add-in works on both Desktop and Web, so we cannot deliver a feature that only works in one environment. For us, not having it in both is equal to not having it at all, and I'm sure this is the case for most add-ins out there.
So no, it's not honored, not yet at least, but it's a start. Looking forward to seeing it on web too!