473,698 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Office 2007 Interop

Hi,

For years, I've been using visual basic and the Excel Object library
version 9 and 10 to pass data back and forth between Visual Basic and
Microsoft Excel. A few months ago, we changed over to Visual
Basic .NET 2003. After converting the project, I dropped in my code
from from the vb6 days, did a few slight modifications, refereneced
the excel object library 10.0, and viola: worked with office 2000, xp,
and 2003 right away.

So then I bought a new laptop, and it has Office 2007 on it. We've
been talking about switching over and our customers are starting to
switch, so I need to be able to export to it. I opened up my VB .NET,
referenced the Excel Object Library 12.0, and.....

Won't compile because type Excel.Applicati on is not defined.

Huh?

Here are the variables I'm trying to define. This has worked with
every version of office:
Dim oExcelApp As Excel.Applicati on
Dim oWs As Excel.Worksheet
Dim oWb As Excel.Workbook

The error I get is: Type Excel.Applicati on (Excel.Workshee t,
Excel.Workbook) is not defined.

Everything I've seen on the internet says that the Excel types should
be defined. I added in the reference for the Excel Object Library. Can
someone tell me why the type isn't defined?

Thanks!
Tom

Dec 16 '07 #1
0 1804

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

Similar topics

0
3144
by: Dennis G | last post by:
Hi, When the asp.net page is loading, i want to open a visio file (2007), change the commandstring of a datarecordset in the visio file, export the visio file to an image file (.png) and show the image on my asp.net page. But a get an error: Retrieving the COM class factory for component with CLSID {00021A20-0000-0000-C000-000000000046} failed due to the following error: 80070003.
2
7297
by: JC | last post by:
Anybody knows what problem has this code? I think, in the Garbage Collector? You know the Solution? The program in the test's case, whit 350 contacts, run OK before number 86. The error is a "Array index out of bounds". Microsoft.Office.Interop.Outlook._Application olApp = new Microsoft.Office.Interop.Outlook.ApplicationClass(); Microsoft.Office.Interop.Outlook._NameSpace olNs = olApp.GetNamespace("MAPI");
1
1182
by: tamasumalta | last post by:
Hi, I am adding a reference to Microsoft Word Office 11 under the COM tab. I will do the coding required to work with word from vb.net, what happens if the client does not have OFFICE 2003 installed? What happens if the client does not have OFFICE installed? What happens if Office is not installed in the location specified by the assembly? If the client has OFFICE 2007 or OFFICE is installed in another location will my program work?
0
4127
by: Bill Fallon | last post by:
I am developing a VB.Net application with VS 2005 that opens an Excel workbook and populates the worksheet with data. I started developing the application with Office 2007 installed on my Vista OS, but after I discovered that it won't run on a system with Office 2003, I uninstalled Office 2007 and installed Office 2003. I reset the reference in .Net to the Microsoft Excel 11.0 Object Library. The application works fine from the ..Net...
0
1774
by: chovatia.jaydeep | last post by:
Hi, I want to hide Menubar/Toolbar in Word/Excel 2007. I followed steps given in the link: http://msdn2.microsoft.com/en-us/library/aa338202.aspx Following above linke, i created Add-In project in Visual Studio 2005 and added code mentioned here in the application Line 1: Imports Microsoft.Office.Core Line 2: Imports Word = Microsoft.Office.Interop.Word
1
25133
by: PulkitZery | last post by:
Hello! I am looking to find Microsoft.Office.Interop.Word dll for Office 2007, to include it into my project’s bin folder. I tried to download it from : http://www.microsoft.com/downloads/details.aspx?familyid=59daebaa-bed4-4282-a28c-b864d8bfa513&displaylang=en But my problem is that when I extract the file and run the setup, it does not give me any idea where to get those file or where is it saving those dlls. I even don’t think it is...
1
3697
by: Manikandan | last post by:
Hi, I have a question reg excel interop. I have no excel installation(office installation) in my system I'm using office web components in my application. is there any help available to use office web components in c# windows application? I would like to know how to regenerate interop assembly for excel I tried using tlbimp, getting error as below TlbImp : error TI0000 : The input file 'C:\DEV\test\ExcelInterop\O
1
1591
by: =?Utf-8?B?VGVycnkgQWxsZW4=?= | last post by:
When referencing the Microsoft Graph 11.0 Object Library in a C# applicaion using Visual Studio 2005 it uses the path below. C:\WINDOWS\assembly\GAC\Microsoft.Office.Interop.Graph\12.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Graph.dll I have both Office 2003 and 2007 installed on my machine but wish to only reference the version 11 COM components. Do to my situation I need to use both versions of Office, but the intended...
3
1244
by: happy.john1234 | last post by:
Hi, how can i manipulate office 2007 files via vs2005.Actually my requirement is to analyze all the attachment present in the office files like images, pdf objects, multimedia contents etc.I found that framework 3.0+ has a native support for office 2007 but since i have to do it with vs2005,are there some pretty nice way to do that.I found some samples doing these thing by using zip library.Are there any other efficient way to do so?...
0
2081
by: Luft | last post by:
I'm just starting to work with VSTO and Word 2007 but I've run into a problem when trying to create an add-in. I get the warning: This project references the primary interop assembly for Microsoft Office Word 2007, but this primary interop assembly is not installed. I have installed the interop assembly by running: PrimaryInteropAssembly.exe I also set a project reference to the Microsoft Word 12.0 Object Library but I still get this...
0
8672
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8600
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9155
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9018
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7711
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5859
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4360
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2322
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1997
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.