using dll from word

H

Han Sen

I'm creating a dll that I want to use from word.

The setup copies dll to program folder and registers the dll in the
GAC. This all seems to work fine (file gets copied and registered in
GAC).

In word I register the dll in my vba project (tick it in the register
dialog for my dll - which now refers to the mydll.tlb) and try to run
the dll like this:

sub main()
set t = createobject("mydll.mydll")

Running the code gives me the error:

Run-time error '429':
ActiveX component can't create object

I get the same error if I use:
set t = new mydll.mydll

(when I do the above "new mydll.mydll" I get the mydll reference in
the intellisense, so it must be registered somehow...)

The dll runs just fine from my development pc. It's only on new
machines I get the error.

What could I be doing wrong?

Morten
 
H

Han Sen

yes, the .net framework is installed (same version).

When I try to register the dll using regsvr32 mydll.dll I get the
message (freely translated):

mydll.dll was loaded, but entry point DllRegisterServer was not found.
File can not be registered.

Both develop and test/production machines runs xp pro sp2++ (only
language differes).

Morten
 
S

scorpion53061

It sounds like the user has an earlier version of MS Word than what your
library is or does not have MS Word installed. If neither is the case
have them reinstall MS Word.
 
H

Han Sen

It appears that I have some reference on my dev pc that is not on the
test/production???
 
H

Han Sen

....word 2003 is installed on both pc.

there are no references from the dll to word. The dll is designed bo
be called from all office programs. The dll simply "takes over" the
FileNew and FileOpen dialogs.

Morten
 
S

scorpion53061

Exactly. The test PC does not have the same library you have installed
or the installation is corrupted.
 
H

hansiman

The only thing I can think of in the dll that may require something
else than the .NET framework is my usage of XPath!

Haven't yet studied if if my usage of XPath requires a certain version
of msxml! Could this be it? If so, is it possible to include msxml
version x in my installation? Or will users have to download and
install?

Morten
 
Y

you

I'm creating a dll that I want to use from word.

The setup copies dll to program folder and registers the dll in the
GAC. This all seems to work fine (file gets copied and registered in
GAC).

In word I register the dll in my vba project (tick it in the register
dialog for my dll - which now refers to the mydll.tlb) and try to run
the dll like this:

sub main()
set t = createobject("mydll.mydll")

Running the code gives me the error:

Run-time error '429':
ActiveX component can't create object

I get the same error if I use:
set t = new mydll.mydll

(when I do the above "new mydll.mydll" I get the mydll reference in
the intellisense, so it must be registered somehow...)

The dll runs just fine from my development pc. It's only on new
machines I get the error.

What could I be doing wrong?

Morten

I am having the exact same issue with a dll that I created for use with
Access. I hope someone has an answer.
 
H

hansiman

Well, just to finish the thread. I found that my configuration of the
setup project was incorrect. A new setup project took care of the
trouble.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top