How to fix Microsoft word has stopped working error ?

Sridharan Arumugam 20 Reputation points
2024-02-28T11:51:29.01+00:00

I use below python code to check if MS Word installed in the system. It works fine in many system but shows error in tester system.

import win32com.client

app = win32com.client.DispatchEx("Word.Application")

app_name = app.str()

app.Quit()

del app

We get following error popup,

Image

I thought this code has issue and error popup is suppressed in my system.

In system which has this issue, Windows Registry is modified for, Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Windows Error Reporting. Key 'DontShowUI' is set to 0. I also updated this setting in my system but code works fine without showing error popup.

Can you tell if there is problem with this code ? Is there any settings need to be modified to get this error popup ? Or this registry settings no way related to error popup ?

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Install, redeem, activate | For business | Windows
Microsoft 365 and Office | Word | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emi Zhang-MSFT 30,046 Reputation points Microsoft External Staff
    2024-02-29T07:28:12.6933333+00:00

    Hi,

    Did you check if the tester system Word version is the same as other systems? Make sure you have using the latest version of Office in tester system.

    I suggest you to collect the event log and provide us with the whole error messages of event log.

    Steps of collecting event log:

    Open Event Viewer to check whether there's any error about the Excel/Word crash issue. Press Win + R, type "eventvwr" in the blank box, press Enter. In the Event Viewer, browse to Windows Logs -> Application, there may be some errors after the crash.

    Please try to collect this event log and post the whole event log message here. I can get more information about your issue from this message and help you solve it.


    If the response is helpful, please click "Accept Answer" and upvote it. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.