Working with Microsoft Word files – “-2147319779 Automation error Library not registered” error message when creating object.


A few weeks back I had a problem on a clients site, our application which interacts with Word files, was falling over when trying to create a Word object. This was not a problem with our coding as it has been working fine for many years and this problem was specific to a couple of workstations.

The error given was "-2147319779 Automation error Library not registered".

This error does happen if parts of Office become corrupt and sometimes if the normal.dot template file is corrupted, so tried all the usual fixes to correct these problems. None of these seemed to work and correct the fact that it could not create a Word object.

On further investigation I had found that the client had decided to try out Office 2007 on the two workstations in questions, they later decided they did not like it that much, uninstalled and re-installed Office 2003.

When Office 2007 is uninstalled, by default it leaves behind it’s Interop Assemblies. These must be removed separately, which the users had not done. Uninstalling ”Microsoft Office 2007 Primary Interop Assemblies” though the control panel -> add and remove programs, corrected the problem.

Problem: error code "-2147319779 Automation error Library not registered" when trying to work with Word files or Excel from separate application.
Cause: Installing Office 2007 and then removing it at later date replacing with previous version.
Resolution: Uninstall ”Microsoft Office 2007 Primary Interop Assemblies”.
Cause of Problem: Microsoft Office. 

Paul B
MCP

Microsoft Access always asking to open files in safe mode.


Had an issue today, where the clients system would always prompt the users to open MS Access 2003 Runtime in safe mode, even having cancelled the error and closing it which should reset it.

Error message on startup was "Access failed to start correctly last time. Starting Access in safe mode will help you correct or isolate a startup problem in order to successfully start the Program. Some functionality may be disabled in this Mode. Do you want to start Access in this Mode?".

Sometimes if file was ran directly it would open OK, but if file was ran from another app or the run command like ‘msaccess.exe "c:\mydb.mde" /excl’ (for example to ensure the file was locked as exclusive to the user opening it, or to pass any command line parameters to the Access file), you would always be prompted with the message.

Spent several hours trying to find a solution to this, uninstalling files and reinstalling, putting on the full version of Office 2003 Pro, manually deleting all registry keys and reinstalling, ‘Detect and Repair’ menu option, etc. Nothing would prevent it from happening.

Having been unable to find any direct references to this situation I found some message board comments that pointed to a sub-setting in the registry key

HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Access\Resiliency

For a similar issue with Access 2002, recommending deleting the registry key. The entry the message board mentioned was not there for the equivilant Access 2003 key and deleting the entire key had no effect.

After spending a significant amount of time searching for any other references, found a vague reference to something similar happening with Outlook 2000 and a similar key for Outlook 2000 buried in the Terminal Services key tree. Managed to trace the Access 2003 version of this key value down to

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\Software\Microsoft\Office\11.0\Access\Resiliency

Deleting this key resolved the problem and Access files would open correctly again!

Paul B
MCP

Blog Disclaimer


As per the disclaimer on my homepage all posts are provided "AS IS". No warranty is implied and no rights or privileges are conveyed. All trademarks and copyrights are acknowledged.

I am not associated with Microsoft, and all comments held here are my own and are done so on a personal level and not as part of my employment.

Any feeds and links used are are done "AS IS" and I have no control over their content.

Content Copyright ©2007-2011 Paul Bunting, All Rights Reserved.