Connecting Tech Pros Worldwide Help | Site Map

using dll from word

Han Sen
Guest
 
Posts: n/a
#1: Nov 21 '05
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
JohnFol
Guest
 
Posts: n/a
#2: Nov 21 '05

re: using dll from word


do the new machines have the .Net framework installed?


"Han Sen" <han@sen.se> wrote in message
news:cuent09aqd5341vphk7os1itv9faflpvc3@4ax.com...[color=blue]
> 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[/color]


Han Sen
Guest
 
Posts: n/a
#3: Nov 21 '05

re: using dll from word


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

On Wed, 05 Jan 2005 10:31:30 GMT, "JohnFol"
<OutlookExpress@WibbleObbble.Com> wrote:
[color=blue]
>do the new machines have the .Net framework installed?
>
>
>"Han Sen" <han@sen.se> wrote in message
>news:cuent09aqd5341vphk7os1itv9faflpvc3@4ax.com.. .[color=green]
>> 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[/color]
>[/color]

scorpion53061
Guest
 
Posts: n/a
#4: Nov 21 '05

re: using dll from word


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.

"Han Sen" <han@sen.se> wrote in message news:han@sen.se:[color=blue]
> 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
>
> On Wed, 05 Jan 2005 10:31:30 GMT, "JohnFol"
> <OutlookExpress@WibbleObbble.Com> wrote:
>[color=green]
> >do the new machines have the .Net framework installed?
> >
> >
> >"Han Sen" <han@sen.se> wrote in message
> >news:cuent09aqd5341vphk7os1itv9faflpvc3@4ax.com.. .[color=darkred]
> >> 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[/color]
> >[/color][/color]

Han Sen
Guest
 
Posts: n/a
#5: Nov 21 '05

re: using dll from word


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

On Wed, 05 Jan 2005 10:31:30 GMT, "JohnFol"
<OutlookExpress@WibbleObbble.Com> wrote:
[color=blue]
>do the new machines have the .Net framework installed?
>
>
>"Han Sen" <han@sen.se> wrote in message
>news:cuent09aqd5341vphk7os1itv9faflpvc3@4ax.com.. .[color=green]
>> 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[/color]
>[/color]

Han Sen
Guest
 
Posts: n/a
#6: Nov 21 '05

re: using dll from word


....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

On Wed, 5 Jan 2005 12:07:23 +0000, "scorpion53061"
<scorpion_53061@nospamhereyahoo.com> wrote:
[color=blue]
>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.
>
>"Han Sen" <han@sen.se> wrote in message news:han@sen.se:[color=green]
>> 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
>>
>> On Wed, 05 Jan 2005 10:31:30 GMT, "JohnFol"
>> <OutlookExpress@WibbleObbble.Com> wrote:
>>[color=darkred]
>> >do the new machines have the .Net framework installed?
>> >
>> >
>> >"Han Sen" <han@sen.se> wrote in message
>> >news:cuent09aqd5341vphk7os1itv9faflpvc3@4ax.com.. .
>> >> 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
>> >[/color][/color][/color]

scorpion53061
Guest
 
Posts: n/a
#7: Nov 21 '05

re: using dll from word


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

"Han Sen" <han@sen.se> wrote in message news:han@sen.se:[color=blue]
> It appears that I have some reference on my dev pc that is not on the
> test/production???
>
> On Wed, 05 Jan 2005 10:31:30 GMT, "JohnFol"
> <OutlookExpress@WibbleObbble.Com> wrote:
>[color=green]
> >do the new machines have the .Net framework installed?
> >
> >
> >"Han Sen" <han@sen.se> wrote in message
> >news:cuent09aqd5341vphk7os1itv9faflpvc3@4ax.com.. .[color=darkred]
> >> 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[/color]
> >[/color][/color]

JohnFol
Guest
 
Posts: n/a
#8: Nov 21 '05

re: using dll from word


what if you create an instance in VB Script? This will at least rule out
Word.


"Han Sen" <han@sen.se> wrote in message
news:cuent09aqd5341vphk7os1itv9faflpvc3@4ax.com...[color=blue]
> 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[/color]


hansiman
Guest
 
Posts: n/a
#9: Nov 21 '05

re: using dll from word


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

On Wed, 5 Jan 2005 12:39:11 +0000, "scorpion53061"
<scorpion_53061@nospamhereyahoo.com> wrote:
[color=blue]
>Exactly. The test PC does not have the same library you have installed
>or the installation is corrupted.
>
>"Han Sen" <han@sen.se> wrote in message news:han@sen.se:[color=green]
>> It appears that I have some reference on my dev pc that is not on the
>> test/production???
>>
>> On Wed, 05 Jan 2005 10:31:30 GMT, "JohnFol"
>> <OutlookExpress@WibbleObbble.Com> wrote:
>>[color=darkred]
>> >do the new machines have the .Net framework installed?
>> >
>> >
>> >"Han Sen" <han@sen.se> wrote in message
>> >news:cuent09aqd5341vphk7os1itv9faflpvc3@4ax.com.. .
>> >> 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
>> >[/color][/color][/color]

you
Guest
 
Posts: n/a
#10: Nov 21 '05

re: using dll from word


In article <cuent09aqd5341vphk7os1itv9faflpvc3@4ax.com>, han@sen.se
says...[color=blue]
> 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
>[/color]

I am having the exact same issue with a dll that I created for use with
Access. I hope someone has an answer.
hansiman
Guest
 
Posts: n/a
#11: Nov 21 '05

re: using dll from word


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.


On Wed, 05 Jan 2005 11:24:03 +0100, Han Sen <han@sen.se> wrote:
[color=blue]
>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[/color]

Closed Thread