473,395 Members | 1,571 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Accessing COM Object without Interop Assembly Wrapper

Is there a way to access COM object like VB.NET when Option Strict is set to
Off.

I am write an application that will interop with Excel. But the target
machines all have different version (9,10,11) .
Option Strict Off

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim o As Object = GetObject("")

o.GetName()

End Sub

End Class
Mar 9 '06 #1
2 1788
Hi Marlon,
I am write an application that will interop with Excel. But the target
machines all have different version (9,10,11) .


Look for example at
http://dzaebel.net/LatebindWord.htm (swap Word with Excel)

Its German, but the links are also available in English and the
code I think is readable.
ciao Frank
--
Dipl.Inf. Frank Dzaebel [MCP/MVP C#]
http://Dzaebel.NET
Mar 9 '06 #2
Marlon,

Well, yes. Use VB and turn option strict off. This is exactly how I
would handle this particular situation, since using reflection in C# to do
it is a PITA.

Create an assembly in VB that exposes your functionality (which performs
the work of accessing Excel) and then reference that from your project.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Marlon R" <ya********@online.nospam> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Is there a way to access COM object like VB.NET when Option Strict is set
to Off.

I am write an application that will interop with Excel. But the target
machines all have different version (9,10,11) .
Option Strict Off

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim o As Object = GetObject("")

o.GetName()

End Sub

End Class

Mar 9 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Angelos Karantzalis | last post by:
I've built an Assembly to wrap around a COM component. However, I need to add it to the GAC. Upon trying to do that, I'm trying to give the assembly a strong name, which fails because the com...
6
by: Kimmo Laine | last post by:
Hi, we are using COM server through interop, and would like to sign our assembly with strong name. But when building, we get the following error: "Assembly generation failed -- Referenced...
20
by: Razzie | last post by:
Hey all, I'm really going through a small hell right now - I've completely lost it :) I made a project, using two interop libraries from exchange (created them as in this msdn article:...
7
by: Gilad Walden | last post by:
I use C# in .NET framework. I have an ActiveX implemented in C++ that has a COM interface method that gets as it’s out parameter a BSTR* . The interop translates this BSTR* into C# string. From...
15
by: Carlos Lozano | last post by:
Hi, What is the right way to create an OCX COM component. The component is already registerred, but can't create an instance. I am using the reference to the interop module created. If I use...
13
by: Alek Davis | last post by:
Hi, Is it possible to access intrinsic ASP objects, such as Request, from a .NET class. Say, I have a .NET library exposed via a COM or COM+ wrapper. Can this library retrieve the request info...
9
by: Srinivas | last post by:
hi all how to access the outlook user profiles through VB.net any help.... thanks in advanc Srinivas
3
by: Bill Nguyen | last post by:
I suddendly got a ton of errors regarding Interop.ADODB could not be found. Whenever I tried to run the app in development environment, the following errors appeared: The dependency...
0
by: Tobester | last post by:
Hi I am having problems accessing a vb6 dll from ASP.Net. The vb6 dll is registered. I have then created an interop file using tlbimp. The interop has been added to the GAC. I can run the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.