Hello,

We have a VB.Net program that uses GetObject() method. While executing the program, it gives the following exception.

<b><i>
"Unhandled Exception: System.Exception: Cannot create ActiveX component.
at Microsoft.VisualBasic.Interaction.GetObject(String PathName, String Class)"</i></b>

The same program is executing successfully in our production environment but not in one of the development environment. We came to know that the program referring to STDOLE.DLL which is not there on the development machine where the program fails. Even if we copy the same dll on that machine, it is not working. How can we install Primary Interop Assemblies seperately? we do not want to install Visual studio.net.

Please let me know what are all the dlls required to use GETOBJECT() method in VB.Net program?

Thank you in advance,
:) Raheem MA :)

Even if we copy the same dll on that machine, it is not working.

And you did register that dll with regasm, not just copy it, right?

what are all the dlls required to use GETOBJECT() method in VB.Net program

I suggest downloading the whole Primary Interop Assemblies separately and include it in your installation package (link refers to Office XP version of PIA, check the PIA version you need, like 2003 or 2007).

HTH

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.