HighTechTalks DotNet Forums  

.Net Assembly as COM invoked from VBScript

Dotnet Scripting microsoft.public.dotnet.scripting


Discuss .Net Assembly as COM invoked from VBScript in the Dotnet Scripting forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
alcabo
 
Posts: n/a

Default .Net Assembly as COM invoked from VBScript - 05-13-2006 , 08:19 AM






Hello,

I have a .net assembly (.dll) exported and registered as COM.

I've invoked it from a script in Windows Scripting Host (WSH) written in
VBScript and it ran fine.

I'd like to invoke this component from macros of MsOffice2003 and I'm using
the Visual Basic Macro Editor to do that, but I get an error. This error
says: "File or assembly name XXXX, or one its dependencies, was not found",
and it has the code -2147024894.

I don't understand the source of that error because the same script works
fine in WSH (so the component is registered).

Any idea about this problem?

some limitation in Visual Basic of Office2003 to invoke a .NET assembly
registered as COM?

Thank you in advance



Reply With Quote
  #2  
Old   
Peter Torr \(MS\)
 
Posts: n/a

Default Re: .Net Assembly as COM invoked from VBScript - 05-19-2006 , 10:10 PM






"alcabo" <alcabo (AT) discussions (DOT) microsoft.com> wrote

Quote:
I'd like to invoke this component from macros of MsOffice2003 and I'm
using
the Visual Basic Macro Editor to do that, but I get an error. This error
says: "File or assembly name XXXX, or one its dependencies, was not
found",
and it has the code -2147024894.
Make sure the assembly is in the GAC or in the same folder as Office.

I am guessing you put the assembly in %systemroot%\system32 so it would work
with WSH?

Peter

--
Peter Torr - http://blogs.msdn.com/ptorr
HD DVD Program Manager




Reply With Quote
  #3  
Old   
alcabo
 
Posts: n/a

Default Re: .Net Assembly as COM invoked from VBScript - 05-20-2006 , 07:32 AM



Hello Peter,

The assembly is in the GAC.

At the moment, I don't know what's wrong. If I find out the problem, I'll
post the solution.

Alex
--

"Peter Torr (MS)" wrote:

Quote:
"alcabo" <alcabo (AT) discussions (DOT) microsoft.com> wrote in message
news:CAC6AB0A-242D-4D4C-AC88-68E05512C795 (AT) microsoft (DOT) com...
I'd like to invoke this component from macros of MsOffice2003 and I'm
using
the Visual Basic Macro Editor to do that, but I get an error. This error
says: "File or assembly name XXXX, or one its dependencies, was not
found",
and it has the code -2147024894.

Make sure the assembly is in the GAC or in the same folder as Office.

I am guessing you put the assembly in %systemroot%\system32 so it would work
with WSH?

Peter

--
Peter Torr - http://blogs.msdn.com/ptorr
HD DVD Program Manager




Reply With Quote
  #4  
Old   
Peter Torr \(MS\)
 
Posts: n/a

Default Re: .Net Assembly as COM invoked from VBScript - 05-20-2006 , 12:25 PM



"alcabo" <alcabo (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello Peter,

The assembly is in the GAC.

At the moment, I don't know what's wrong. If I find out the problem, I'll
post the solution.

Are you using CreateObject or are you adding a reference under Project ->
References?

Peter

--
Peter Torr - http://blogs.msdn.com/ptorr
HD DVD Program Manager




Reply With Quote
  #5  
Old   
alcabo
 
Posts: n/a

Default Re: .Net Assembly as COM invoked from VBScript - 05-20-2006 , 05:34 PM



I'm using CreateObject as I did with the VBScript in WSH.


"Peter Torr (MS)" wrote:
Quote:
Are you using CreateObject or are you adding a reference under Project -
References?

Peter

--
Peter Torr - http://blogs.msdn.com/ptorr
HD DVD Program Manager




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.