Hi Dáňová Daniela (MHMP, OIC),
You’re not the only one encountering it. The error DISP_E_TYPEMISMATCH after installing KB5094126 has been reported by others as well, and it appears to be a regression introduced by that cumulative update. Since you’ve reproduced it with a minimal test app, it’s safe to say this isn’t tied to your application logic but rather to the update itself.
The most reliable workaround at the moment is to uninstall KB5094126 from Settings > Windows Update > Update history > Uninstall updates and then pause updates temporarily to prevent it from reinstalling. Doing so restores Word COM automation functionality.
If uninstalling isn’t practical in your environment, you may want to run automation tasks on machines that haven’t yet applied KB5094126 until the fix is released. Keeping an eye on the official Windows release notes will help you know when the patch becomes available.
Jason.