How to Fix Microsoft Word Has Stopped Working During Python COM Detection
Question details
The user needs to resolve an issue where Microsoft Word crashes and displays a 'stopped working' error dialog when trying to initialize a COM object via Python.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Using Python's win32com.client to create a Word COM object to detect if Microsoft Word is installed on the system.
- Observed behavior
- Microsoft Word fails during initialization, triggering a Windows Error Reporting popup that says 'Microsoft Word has stopped working', which disrupts the automated detection process.
Ensure you are logged into the same Windows user account that the Python script is running under, as COM permissions and Office user profiles are account-specific.
Diagnose Word Add-ins and Repair Office Installation
Use this solution to address corrupted Office files or conflicting third-party add-ins that cause Word to crash upon COM initialization.
Suppressing error dialogs through Windows Error Reporting does not fix the underlying reason Word is crashing. The issue is usually related to a corrupted Office installation, an incompatible add-in loading at startup, or a broken user profile.
Update your Python script to wrap the `win32com.client.Dispatch("Word.Application")` call in a try-except block. This ensures the script catches the COM exception gracefully without abruptly halting the process.
Press Windows + R, type `winword /safe`, and press Enter. If Word opens without crashing, an add-in is likely the culprit. Go to File > Options > Add-ins to disable active add-ins one by one to identify the conflict.
Right-click the Start button, select Event Viewer, and navigate to Windows Logs > Application. Look for 'Error' level events related to WINWORD.EXE to identify the specific faulting module.
Open Control Panel and go to Programs > Programs and Features. Right-click Microsoft Office in the list, select Change, and choose Online Repair. Follow the prompts to restore missing or corrupted initialization files.

Verify DCOM Permissions and User Profile Configuration
Use this method if repairing Office does not work, as incorrect system permissions or a corrupted Windows user profile can block COM initialization.
Use WPS Office as a Lightweight, Stable Alternative
If Microsoft Word continues to struggle with COM errors, system crashes, or sluggish initialization, consider switching to WPS Office. It provides a highly compatible, lightweight solution for handling all your document needs without the heavy resource overhead of Microsoft Office.
- 1. Download the WPS Office installer: Visit the official WPS website and click the free download button to get the latest version for your operating system.
- 2. Install the application: Run the downloaded installer and follow the quick setup wizard to install the software on your computer.
- 3. Set as the default document editor: Open WPS Office and follow the prompt to set it as your default program for handling Word, Excel, and PowerPoint files.

Frequently Asked Questions
Why does the crash popup still appear even when using a try-except block in Python?
The Windows Error Reporting (WER) system intercepts application crashes at the OS level before Python can catch the COM exception. The try-except block catches the Python-level COM error, but it cannot suppress the operating system's native crash dialog.
How can I tell exactly what is causing Word to crash during win32com initialization?
You can find detailed crash logs in the Windows Event Viewer. Navigate to Windows Logs > Application, filter the current log for 'Error', and look for Application Error events mentioning WINWORD.EXE. The 'Faulting module name' usually indicates the problematic add-in or DLL file.
Can third-party add-ins affect COM initialization?
Yes. When Word is initialized via a COM object, it typically attempts to load installed add-ins by default. If an add-in is incompatible, out of date, or expecting a visible user interface, it can cause Word to crash instantly during the initialization sequence.




