PDA

View Full Version : Solved: Object Library Not Registered



Howard Kaikow
02-17-2005, 07:10 PM
Recently, I had a hard drive disaster. I thought that all files had been
restored, I guess not.

The system is multiboot, with Win 2000 on the C drive and Office 97
installed under that OS.

Today I tried looking at Tools | References in the Word VBIDE.
I was not given the list of references, instead I got a message box stating
"Object library not registered".

Note that macros seem to run, I just cannot use Tools | References.

This problem does not occur in either Excel or Powerpoint.

The help for the message is something like that below the dashed line below

What's the fix?
How do I reregister VBA for Word?
A similar problem seems to be addressed in KB article 315576.

I tried uninstalling, the re-installing Office 97, but that did not really
work.
Indeed, I had Office 97 SR-2 installed, so when I uninstalled Office 97,
then used an Office 97 SR1 to re-install, I was surprised to find that the
Help still said SR2.:

Is there a fix?

Or will I have to use eraser97 to wipe out Office 97, then re-install?
--------------------------------------------------------------------------
Object library not registered


The Visual Basic for Applications object library is no longer a standalone
file; it is integrated into the dynamic-link library (DLL).

In earlier versions, when you started an application that uses Visual Basic
for Applications, certain object libraries were loaded. This error has the
following cause and solution:

a.. An attempt was made to load a previous version of the Visual Basic for
Applications object library (vaxxx.olb) or host-application object
libraries. However, the correct language version of these object libraries
could not be found in the system registry.
Reregister your application. On the Macintosh, delete the vba.ini file
from the Macintosh Preferences folder, and restart your application.

For additional information, select the item in question and press F1 (in
Windows) or HELP (on the Macintosh).

Anne Troy
02-17-2005, 08:16 PM
Here's EXACTLY what I would do, Howard:

Close Word if it's open.
Start-->Run and type regedit and hit Enter
Browse to the following folder:
hkey_current_user\software\microsoft\office\8.0\word
Right-click and hit RENAME and call it OldWord
Re-launch Word.
This forces Word to re-register itself with Windows. For "listeners", the 8.0 means Office 97. 2000 is 9.0, XP is 10.0 and 2003 is 11.0. This fix works for virtually all the apps (changing the folder of course) when you THINK you need to reinstall the program, or when reinstalling doesn't help.

Good luck, Howard!
PS: Renaming the folder alleviates the need to backup the Windows registry. Suppose the fix doesn't work for you, or you're worse off than when you started (for some strange reason). Then, you just go back in there, delete the newly created Word folder, and rename OldWord back to Word, and you're back where you were when you started.

Howard Kaikow
02-17-2005, 11:55 PM
Here's EXACTLY what I would do, Howard:


Close Word if it's open.
Start-->Run and type regedit and hit Enter
Browse to the following folder:

hkey_current_user\software\microsoft\office\8.0\word
Right-click and hit RENAME and call it OldWord
Re-launch Word.
This forces Word to re-register itself with Windows. For "listeners", the 8.0 means Office 97. 2000 is 9.0, XP is 10.0 and 2003 is 11.0. This fix works for virtually all the apps (changing the folder of course) when you THINK you need to reinstall the program, or when reinstalling doesn't help.

Good luck, Howard!
PS: Renaming the folder alleviates the need to backup the Windows registry. Suppose the fix doesn't work for you, or you're worse off than when you started (for some strange reason). Then, you just go back in there, delete the newly created Word folder, and rename OldWord back to Word, and you're back where you were when you started.

Thanx fer the suggestion.

Has no effect on the problem.


Hmmm. perhaps I'll run WinDoctor to see whether anything is detected.

Anne Troy
02-18-2005, 12:04 AM
Well...you can completely remove Office manually instead of using Eraser, which never was very efficient anyway.

Here's an extensive writeup I did quite some time ago.
http://forums.techguy.org/t192959

Howard Kaikow
02-18-2005, 12:11 PM
Well...you can completely remove Office manually instead of using Eraser, which never was very efficient anyway.

Here's an extensive writeup I did quite some time ago.
http://forums.techguy.org/t192959

First, I will uninstall Office using Add/Remove programs.
This should have the advantage of removing the uninstall entry, which is not difficult to remove with a registry edit, but is cleaner this way.

Then I will move/rename the Office files and the Office registry key.

But, before doing the above, I'll take a look at the latest eraser97 stuff, maybe there's a more recent version?

Anne Troy
02-18-2005, 12:16 PM
maybe there's a more recent version?

Nope...

Howard Kaikow
02-18-2005, 12:41 PM
Nope...

I just downloaded the latest eraseer97.exe.

It's not the same size as the one I downloaded many moons ago.

The difference could be die to different compaction, but I dunno.

fumei
02-18-2005, 12:54 PM
Howard, re the other thread on making references via Automation. I believe these are related. Whatever you have....I now have as well. i used to have no problems, but now - after I opened your file (re:the Automation post), I no longer has any control over references and type libraries.

Whatever you have, it is transmissable...and is gonna be a great big pain in the butt to try and fix this. This is a huge problem for me, and has really ticked me. If you find a solution, PLEASE post it!

fumei
02-18-2005, 01:27 PM
And YO!, people!!! Do NOT download Howard's file!

I have tried re-registering Office apps. I have tried reloading and manually re-registering the DLLs directly. NOTHING. I can no longer set references...at all.

Howard....oh never mind.

Howard Kaikow
02-18-2005, 03:30 PM
Howard, re the other thread on making references via Automation. I believe these are related. Whatever you have....I now have as well. i used to have no problems, but now - after I opened your file (re:the Automation post), I no longer has any control over references and type libraries.

Whatever you have, it is transmissable...and is gonna be a great big pain in the butt to try and fix this. This is a huge problem for me, and has really ticked me. If you find a solution, PLEASE post it!

If all you did was use the source I posted, that did not tranmit anything.

My problem with Office 97 is due to replacing a disk drive and the files not being properly restored. It's got nothing to do with the set reference issue,

Howard Kaikow
02-18-2005, 04:35 PM
First, I will uninstall Office using Add/Remove programs.
This should have the advantage of removing the uninstall entry, which is not difficult to remove with a registry edit, but is cleaner this way.

Then I will move/rename the Office files and the Office registry key.

But, before doing the above, I'll take a look at the latest eraser97 stuff, maybe there's a more recent version?

The task is complicated because I also have Expedia 98, Outlook 98 and
Publisher 98 installed.
I guess that I need to uninstall those before using eraser97.

Then re-install Outlook 98 and Publisher 98.
Then Office 97 SR1, then SR2.

Howard Kaikow
02-18-2005, 04:44 PM
Howard, re the other thread on making references via Automation. I believe these are related. Whatever you have....I now have as well. i used to have no problems, but now - after I opened your file (re:the Automation post), I no longer has any control over references and type libraries.

Whatever you have, it is transmissable...and is gonna be a great big pain in the butt to try and fix this. This is a huge problem for me, and has really ticked me. If you find a solution, PLEASE post it!

I just ran the posted stuff using Word 97, Word 2000, Word 2002 and Word 2003.

All performed as I described in the URL I posted. And there is nothing in the code that can affect anything else.

I also ran, in Word 97, the sub DemonstrateRefIsNotSaved that I posted here. Sub worked as expected and did add the reference. However, in Word 97, I could not use the Tools | References menu to look at things.

In my case, the problem is almost certainly due to an improper restore of my drives after replacing a hard drive. This is described in another thread here, where Clearformatting broke until I did a Detect and Repair or re-install in 3 of the 4 Office versions installed.

The problem wiht Office 97 is more likely due to a subsequent problem with the replacement hard drive (yes, it was replaced twice) and my running WinDoctor. My gut feeling is that I allowed WinDoctor to make changes that I should not have.

So I will need to uninstalll, maybe use eraser97, to restore Office 97.

Howard Kaikow
02-19-2005, 01:15 PM
Eureka, I found the problem!

Permit to pause whilst I let off some steam.

Hsssssssssssssssssssssssssssssssssssssssss!

Ah, that felt good.

After spending severals hours today uninstalling, re-installing, using eraser97 and manually removing things, I was finally able to re-install Office and not have the error occur.

However, my glee was short lived!

When I restored my global templates to the Startup directory, the error re-appeared!

I then added the templates to the Startup directory 1 at a time and found the problem.

On 4 Oct 2004, I had modified one of the global templates and somehow the reference to the VBA extensibility library 5.3 was "MISSING". Due to changes I made back in Oct, I'm not even sure tgat the reference is any longer necessary, which is likely why I never noticed a problem.

So, it would appear that I had not used Tools | References in Word 97 since at least 4 October 2004.

All I had to do was correct the reference in a copy of the global template that was not in the Startup directory, then replace the critter in the Startup directory.

I used Retrospect to restore the C drive to yesterday's files, then replaced the template.

Solution was simple.
Path to finding it very difficult.

MSFT error message not very useful.

Why did it not just tell me that there was a specific midssing reference?

fumei
02-22-2005, 10:20 AM
Howard, I have elimated all office products. I took a brand new machine, an unformatted hardrive and installed just the OS (Windows 2000Pro); installed Office. I tried using Automation to adda new reference to a Word document, and a Word tenplate (re: your other thread) and it worked fine.

I then ran your code, but not your file. You are correct (and my apologies!), it is NOT your file. However, once I ran the code, I could no longer make any references - either manually, or via code.

I still can not. It is has nothing to do with my drives. I have only the one drive, and ALL it has on it the OS and Office. I still can not add ANY references. I can add a reference manually. I save the file, I look again - Yes, the reference is there. I save the file (but do not close it) - yes, the reference is there. I close the file and open it. NO! the reference is NOT there.

It does not make any difference if I add the reference using Tools, References (i.e manually), or by code.

I can not make any new references stick. This is the same in Excel or Word. I can not make references persist after the file is closed.

I have two global templates. BOTH of which already have Extensibility referenced. There are there and persist. However, even those will not allow any further references to be added. At all. Well I can add them and they remain as long as the file is open. But if I save and close, when I reopen, they are not there any more. I have gone to another machine and added references. On those machines, if the file is saved, closed and reopened, the references are there - they persist. However, if the same file is brought to my machine, the references are NOT there. If I send the file back again to the other machine - the references ARE there. But my machine absolutely refuses to accept any new references.

This applies to a document, a regular template, or to a global template. It will not allow any new references to be added.

Thoughts. Apologies again, for stating your file has something wrong. It is clearly NOT your file, but something with the code.

I went home, and worked on a clean machine. As stated, I had no problem making persistent references UNTIL I ran your code....then BOOM! I can no longer make any persistent references. This was with NO global templates; I was just trying to make new references on a document. No can do. I can NOT add Extensibility, as it no longer allows any new refernces at all.

Thoughts?

Howard Kaikow
02-22-2005, 12:02 PM
Darn my fat fingers!
I just typed in a looooooooooong explanation of why I had my problem and a suggestion as to what you might look for, but my fat fingers caused Firefox to send the posting into the great bit bucket in the sky.

So, I'll leave out the explanation and just suggest what you try.

Remove ALL global templates.
Examine each global template OUTSIDE of the Startup directory using Tools | References to see which reference is MISSING. You appear to have been moving stuff around a lot, that could cause a MISSING reference.

Correct that reference and the problem should go away.

I built my code using Word 97, so if you do not modify the template in any way, downloading the .zip, the code will run in Word 97 and up. If there is a MISSING reference in a global template, then that reference is independent of any reference in my template.

Apparently, Word issues that nasty message if there is a MISSING reference in a global template and does not allow use of Tools | References, even tho code can run if that reference is not needed to run the code. A more friendly message would be to merely state that a particular reference is missing.

fumei
02-22-2005, 03:06 PM
I don't think you are quite reading things well.

I have NO global templates - other than normal.dot which I can't do much about. This is a NEW install of Office.

I have no idea what you are talking about re: moving stuff around. Where are you getting that?

Let's make this simple.

1. Fresh machine - new hard drive, unformatted.
2. Install OS.
3. Install Office
4. References can be freely made, saved...whatever
5. Run your code - NOT your file; I hand wrote it again.
6. NO references can now be made.
7. NO globals were made, or exist.

There can be a gazillion missing references...who cares...I can NOT make any that will persist. Including, BTW VBA Extensibility.

REPEAT: no references can be made IN ANYTHING (document, global whatever - and to repeat in case you have not read this clearly...there are NO globals).

I'll ask again. Thoughts? I am willing to listen, but please, be willing to read.

There are no globals, I am NOT moving stuff around, and I can not make any references persist - either by code, OR by using Tools > References and selecting a references - any reference. They will NOT persist.

fumei
02-22-2005, 03:07 PM
Oh and in case you missed it. You mention:

"Correct that reference and the problem should go away."

I can NOT correct any reference as they will not persist.

Get it?

Howard Kaikow
02-22-2005, 03:38 PM
Oh and in case you missed it. You mention:

"Correct that reference and the problem should go away."

I can NOT correct any reference as they will not persist.

Get it?

I was not referring to the reference that is being added.
I was referring to the reference to the VBA Extensibility 5.3 library.

If you are working from a clean install of the OS and Office, I'd suggest trying the following:

0. Create a new template.

1. Add the following to the template and run the code to see what references are included.



Private Sub ListReferences()
' Requires reference to VBA Extensibility Library 5.3
Dim ref As VBIDE.Reference
Dim strOutput As String

With Application
With .ActiveDocument
strOutput = ""
For Each ref In .VBProject.References
strOutput = strOutput & vbCrLf & ref.Name
Next ref
End With
End With
Debug.Print strOutput
Set ref = Nothing
End Sub


2. Then add and run the following code:



Private Sub AddReference()
' Requires reference to VBA Extensibility Library 5.3
Dim ref As VBIDE.Reference
Dim strOutput As String

With Application
With .ActiveDocument
strOutput = ""
For Each ref In .VBProject.References
strOutput = strOutput & vbCrLf & ref.Name
Next ref
.VBProject.References.AddFromFile FileName:="C:\Windows\system32\scrrun.dll"
strOutput = "----------------" & vbCrLf
For Each ref In ActiveDocument.VBProject.References
strOutput = strOutput & vbCrLf & ref.Name
Next ref
End With
End With
Debug.Print strOutput
Set ref = Nothing
End Sub


3. Then create another new template.

4. Try Tools | References.

If the code works, but Tools | References does not, the implication is that something is making Word unhappy. In my case, it was a missing reference in a global template. I suspect the same would occur if there were a missing reference in an add-in's template, not necessarily in the Startup directory.

fumei
02-24-2005, 08:16 AM
Howard, please read....again.

You make the very true point in your first two lines:


Private Sub AddReference()
' Requires reference to VBA Extensibility Library 5.3

The problem, Howard, and....hmmmmm....I think I have maybe mentioned this.

I can NOT make any references. I really do not know how many times I can say it...or rather write.

I can not make any references, including Extensibility. So, as you correctly point out...it requires Extensibility. Great...except...and hows about...oh, maybe the fifth time I have stated this.

I can NOT make any references that persist. From ANY office app. There are, and I really feel that I am repeating myself, and you are not reading these post, stuck in your own version of reality; but again, there are NO globals, there are NO COM-addins.

There is nothing in and Startup folder. I have even removed any pointers to a Workgroup folder, orTemplates User folder. It is as blank as can possibly be. I still can not make ANY references - including Extensibility. Which is a major pain, as Extensibility severely limits me. And not being to a make a reference to Scripting Runtime is a HUGE pain, as I can no longer make any use of the FileSystemObject.

Any thoughts? Your code is lovely (if a bit verbose), but I can not run it, as...are you listening? I can NOT use Extensibility.

To repeat again, this is a NEW, fresh install of Office, on a New fresh install of Windows 2000. There are no other software installs at all. Nothing.

Howard Kaikow
02-24-2005, 08:15 PM
If your installation is "a NEW, fresh install of Office, on a New fresh install of Windows 2000. There are no other software installs at all. Nothing.", then the problem would appear to be a bad install of Office, or a conflict between Office and some component of Win 2000.

You could try installing Office with, say, just Word and VBA to isolate issues further.

Does this problem occur with all versions of Office or just a particular version?

Howard Kaikow
02-27-2005, 11:29 AM
I have marked this thread as Solved as my problem has been solved.

The problem raised by fumei regarding failure after a clean install of Office belongs in a separate thread.

fumei
03-04-2005, 10:02 AM
I only have 2002.

Just as a bit of curiousity. I have found ONE reference that will persist. Microsoft Office Runtime Type Library...big deal. It absolutely refuses to let me set a reference to VBA Extensibility, or Excel, or Access - this is from Word.

from Excel, it will not let be set references to Word, Access

etc etc

I also (!) can set references from VB 6.0. So I can not make any executables, or COMs that use references.

I wrote a little VB app that runs a command line that un-registered every single DLL, one by one, and re-registered them.

Nothing changed.

I can not make any references. I would love to run a test of your code, but....I can not make a line like VBIDE.Reference, but alas.

I am not sure you should have this marked as "Solved". it sure as %$#@ is not solved for me.

Howard Kaikow
03-04-2005, 10:23 AM
I only have 2002.

Just as a bit of curiousity. I have found ONE reference that will persist. Microsoft Office Runtime Type Library...big deal. It absolutely refuses to let me set a reference to VBA Extensibility, or Excel, or Access - this is from Word.

from Excel, it will not let be set references to Word, Access

etc etc

I also (!) can set references from VB 6.0. So I can not make any executables, or COMs that use references.

I wrote a little VB app that runs a command line that un-registered every single DLL, one by one, and re-registered them.

Nothing changed.

I can not make any references. I would love to run a test of your code, but....I can not make a line like VBIDE.Reference, but alas.

I am not sure you should have this marked as "Solved". it sure as %$#@ is not solved for me.

i marked this thread as solved because the cause was clear and the problem solved.

your problem would appear to be a faulty office/word install.

the real test is to start with an fdisked drive, install an os, then install office. if you then still have the problem, only msft may be able to help. however, this belongs in a separate thread. it's a different problem.

fumei
03-07-2005, 11:32 AM
Howard, I understand that you have been trying to have my posts removed from this thread. Except the one that acknowledges that it is not your file that is the problem. I had the good grace to make that acknowledgement.

Your attempt to do this indicates a sense of poor taste, and as I have previous posted, a regretful ignorance on your part to maintain even a modicum of attention to what other are saying.

This post thread is titled "Object library not registered". In my first post I mentioned that I believed the issue was related to your other thread regarding references.

If you did not think it was appropriate for me to post here, that my post were inappropriate, then you had your chance then. To attempt to do so now indicates a weak, egocentric, and rather cowardly pathetic effort to dance away from the issues raised here.

The post further developed - as posts do - into your mention Eraser, and re-install of Office, etc etc. If your evolution of the thread is acceptable, them mine are as well. - Oh, but does that only apply to you? Are posts that directly continue thread contents only appropriate if YOU find them acceptable?

Again, I had the grace to acknowledge an error. You seem incapable of acknowledging anything other than a exaggerated sense of your own self worth. A worth that certainly is not validated by the code you write.

Generally I ignore "reputations", as they most often are distortions. Yours appears to be quite accurate.

One of the signs of slight maturity is an indication and willingness to listen. I asked for your thoughts, and I think this indicated that I was willing to listen. Your responses indicated that you did not listen at all. I even repeated and asked again. You apparently still are not listening.

To attempt to have my posts removed is a weak gesture.

Take a step back, pause, take a breath and listen. This thread is either still open, NOT solved, or if you want to really hide - ask that it be completely removed. Your reputation makes me make guess which way you would prefer that choice to go. However, as mentioned, I am reluctant to accept "reps". So the choice is yours.

Kill this thread completely, or UNsolve it and continue? The ball is your, sir.

Howard Kaikow
03-07-2005, 03:37 PM
Howard, I understand that you have been trying to have my posts removed from this thread. Except the one that acknowledges that it is not your file that is the problem. I had the good grace to make that acknowledgement.

Your attempt to do this indicates a sense of poor taste, and as I have previous posted, a regretful ignorance on your part to maintain even a modicum of attention to what other are saying.

This post thread is titled "Object library not registered". In my first post I mentioned that I believed the issue was related to your other thread regarding references.

If you did not think it was appropriate for me to post here, that my post were inappropriate, then you had your chance then. To attempt to do so now indicates a weak, egocentric, and rather cowardly pathetic effort to dance away from the issues raised here.

The post further developed - as posts do - into your mention Eraser, and re-install of Office, etc etc. If your evolution of the thread is acceptable, them mine are as well. - Oh, but does that only apply to you? Are posts that directly continue thread contents only appropriate if YOU find them acceptable?

Again, I had the grace to acknowledge an error. You seem incapable of acknowledging anything other than a exaggerated sense of your own self worth. A worth that certainly is not validated by the code you write.

Generally I ignore "reputations", as they most often are distortions. Yours appears to be quite accurate.

One of the signs of slight maturity is an indication and willingness to listen. I asked for your thoughts, and I think this indicated that I was willing to listen. Your responses indicated that you did not listen at all. I even repeated and asked again. You apparently still are not listening.

To attempt to have my posts removed is a weak gesture.

Take a step back, pause, take a breath and listen. This thread is either still open, NOT solved, or if you want to really hide - ask that it be completely removed. Your reputation makes me make guess which way you would prefer that choice to go. However, as mentioned, I am reluctant to accept "reps". So the choice is yours.

Kill this thread completely, or UNsolve it and continue? The ball is your, sir.

You've been misinformed.

I never asked for the posts to be removed.
I asked for relevant posts to be COPIED to a new thread.
Instead, one of the moderators removed the posts and I requested that the posts be put back.

I just do not want anyone to have to wade thru all the posts to address your problem, which, according to you, results from a clean install, so has nothing to do with the problem I raised.

Check your facts before you blame anyone for anything.

Clearly, if you indeed did a clean install of windoze and Office on a clean disk, then your problem is with the installation and only MSFT can help.

I'll not respond further to your comments.

The following is what I requested:

"I was thinking that the following would have minimal impact.

I would not move any of the postings.
The postings where fumei admits that my samples had nothing to do with his problem must remain in the thread,

Just add a post at the end of the thread stating that a new thread has been started.

I would clear the clutter by starting a separate thread that discussed the issue arising after the clean install of windows and office.

If he really is doing a clean install of windows and office and encountering the stated problem, I do not expect that any discussion will help. He would need to call MSFT."

I'm unsubscribing from this thread.