Skip to content

Commit 2cda58e

Browse files
[Word] (troubleshooting) Handle change to window hierarchy (#5043)
* [Word] (troubleshooting) Handle change to window hierarchy * Include images and flesh out guidance * Use aka.ms link instead * Update to use version number
1 parent 919d98e commit 2cda58e

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed
11.3 KB
Loading
12.1 KB
Loading

docs/word/word-add-ins-troubleshooting.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Troubleshoot Word add-ins
33
description: Learn how to troubleshoot development errors in Word add-ins.
4-
ms.date: 10/16/2024
4+
ms.date: 02/25/2025
55
ms.topic: troubleshooting
66
ms.localizationpriority: medium
77
---
@@ -70,6 +70,22 @@ Formatting properties such as [color](/javascript/api/word/word.font#word-word-f
7070
- If all text in the range has the same font color, `range.font.color` specifies that color.
7171
- If multiple font colors are present within the range, `range.font.color` is `null`.
7272

73+
## My add-in can no longer find the correct Word window
74+
75+
Microsoft Word, like other Windows applications, uses a hierarchy of windows to display documents and UI to users. These windows can be identified by window handles or class names. As of Office Version 2502 (Build 18526.20118), one of the windows in Word's hierarchy was removed.
76+
77+
It's possible that your Word add-in has a rigid dependency on Word's previous window hierarchy and so crashes or no longer works correctly. For an example issue, see [Possibly Microsoft 365 Office Apps updates crashing my Word Addin](https://aka.ms/word-wwf-crash-issue). We recommend that developers not rely on a particular window hierarchical structure. Instead, the current guidance is to search for a window's class name. To find the top-level Word window, search for the "OpusApp" class name. To find the window displaying an open Word document, search for the "_WwG" class name.
78+
79+
The following shows an example of the previous Word window hierarchy.
80+
81+
:::image type="content" source="../images/word-window-hierarchy-before.png" alt-text="Previous Word window hierarchy.":::
82+
83+
The following shows an example of the new window hierarchy. Note that the intermediate window with the "_WwF" class name is no longer present.
84+
85+
:::image type="content" source="../images/word-window-hierarchy-after.png" alt-text="New Word window hierarchy.":::
86+
87+
You can use a debugging tool like [Spy++](/visualstudio/debugger/using-spy-increment) to inspect an application's window hierarchy. However, keep in mind that the hierarchy could further change in the future.
88+
7389
## See also
7490

7591
- [Troubleshoot development errors with Office Add-ins](../testing/troubleshoot-development-errors.md)

0 commit comments

Comments
 (0)