What Causes Runtime Error 429?
On Windows systems, runtime error 429 is usually displayed when you try to automate office applications. Office applications are automated using the automation server, which is based on the Windows COM architecture. This server application enables different Office applications to open their internal functions as COM objects to automate the tasks that are usually performed using menus. For instance, you can generate a script to extract information from an Access database, put it into an Excel sheet, and create a chart based on the extracted data.
The error usually occurs when you use either the CreateObject function or the New operator in Microsoft Visual Basic (VB) to create a Microsoft Office application instance. When the error occurs, the system may display the following error message:
Run-time error '429': ActiveX component can't create object
Troubleshoot Automation Server to Fix Error 429
Automation server problems usually occur due to faulty application setup or configuration. To troubleshoot the problem, first ensure that the Office application you are using is installed on the local system and that you are able to run the application manually. For instance, to check if Microsoft Excel is running, open Start > Run, type Excel, and press OK. If the application does not open, then it will not work through automation.
To fix the issue, you will have to re-register the application. For example, to re-register Excel, in the Run dialog box, type C:\Program Files\Microsoft Office\Office\Excel.exe /regserver and press OK.
Note: The path specified may change based on your operating system and Office version.
Verify Registry Entries
If you are facing the error due to missing registry value, performing the following steps usually repairs the error 429.
- Open the Registry Editor window by running the Regedit command.
- Navigate to the registry key
- Verify that the LocalServer32 key uses the correct short path name (DOS 8.3) to point to the application location.
Note: CLSID are class identifiers associated with ActiveX or OLE 2.0 objects that are created by a particular component or server. All CLSID related to automation servers are located below
HKEY_CLASSES_ROOT\CLSID key. CLSID associated with common Office applications are listed below:
To determine the correct path, copy the value from the LocalServer32 key, paste it in the Run dialog box, delete /automate, and click OK. If the application runs, it means it is registered properly. Otherwise, change the path for the application in the LocalServer32 key using the short path name to fix the error.
Corrupted Normal.dot or Excel.xlb
Error 429 may also display if automation fails due to corrupted Normal.dot template or Excel.xlb resource file. To check if errors are generated due to problems in these files, search for all Normal.dot and Excel.xlb files located on your system and rename them. Next, rerun your automation test to check if it runs. If yes, then the deleted files will be recreated with their respective application. If it does not work, then rename the files back to their original names to continue using them.
Note: The two renamed or deleted files will be recreated by the Microsoft Word and Microsoft Excel, respectively, if found missing.
Problems in the automation server of Office applications is one of the most common reasons behind runtime error 429. Based on its cause, you can fix the error either by re-registering the application that is generating the error or by verifying and, if required, fixing the problems in the LocalServer32 key located under the CLSID key in the registry. You may also check for and repair corrupted Normal.dot and Excel.xlb files. To prevent such registry-related problems from occurring on your PC, you may choose to install a reliable registry cleaner. Registry cleaners help you prevent registry keys from getting corrupted and enable you to maintain your computer at its best.