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.