Hi Rob,
Here the code is concern of two Typelibs.
1. Word 2000's Typelib
2. WordTest1.tlb per the link your provide
As for the WordTest1.tlb, it has no related with the Word 2000 in nature.
A OfficeCodeBehind code per the link you provide, it is also a .NET class
library.
For any .NET class library, we can expose it to COM by checking the project
property,Register for COM Interop.
And when we build the class library solution which have checked the
project property,Register for COM Interop, the IDE will generate a tlb.
Commonly it should be ClassLibraryName.tlb.
Once the ClassLibraryName, we can use the .NET library in Unmanaged code
(e.g. vb6) just as the VB6 is calling a legacy COM library.
So far now we need to track what code line cause the error as your provide.
e.g. if the Word Typelib is malfunctional or corrupted, the
createobject("Word.Application") will failed with the error above.
Or if the WordTest1.tlb is corrupted, the code similar will cause the error.
e.g.
Dim o as new WordTest1.MyType
or
Set o = CreateObject("WordTest1.MyType")
A quick way to fix the issue is to re-register the two TypeLib or even
re-install the application.
For Word 2000, we have to reinstall the Word 2000 application, but for
WordTest1.dll, we can use the .NET tool regasm to re-registered it.
e.g.
regasm <path to the WordTest1.dll> /codebase
NOTE: Commonly the steps will also be done by the setup project.
/codebase Creates a Codebase entry in the registry. The Codebase entry
specifies the file path for an assembly that is not installed in the global
assembly cache. You should not specify this option if you will subsequently
install the assembly that you are registering into the global assembly
cache. The assemblyFile argument that you specify with the /codebase option
must be a strong-named assembly.
For detailed information, please take a look at the link below about regasm.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cptools/htm
l/cpgrfassemblyregistrationtoolregasmexe.asp
So far I suggest you remove/reinstall the WordTest1 Application to see if
that works.
Best regards,
Peter Huang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Rob Oldfield - 26 Jun 2006 11:06 GMT
Thanks for the response Peter. I've gone to the machines where it was
failing on Friday to work through your suggestions and, of course, today
everything is working perfectly. I'll post a follow up message as and when
they decide to go wrong again.
> Hi Rob,
>
[quoted text clipped - 59 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
"Peter Huang" [MSFT] - 28 Jun 2006 02:57 GMT
Hi Rob,
Thanks for your quickly reply!
However, if you still have any concern, please feel free to post here.
Best regards,
Peter Huang
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.