473,396 Members | 1,754 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,396 software developers and data experts.

Excel/Word interop for both Office 10 & 11

I am working on an application that uses interop to do some simple operations
with both Excel and Word. I have most of functionality working, but ran into
issues on making things work with both versions of office. My questions are:

1. What is the 'best' practice for building an application that will work
with both versions of office? Do I need to have a separate build with
different references for each?

2. Can I install interop for Office XP and have it co-exist nicely on my
development box (VS 2003, Office 2003)? I tried installing the Office XP
interop and now it seems that Visual Studio has been confused by this -- now
when I put a reference in to the Microsoft Office 11 Object Library, only
single reference to Microsoft.Office.Core is added which is different than
before when references to Excel and Word (and possibly other) were
automatically added.

So the question really is two parts -- what's the 'correct' way to build for
both environments, and as a secondary question, what did I do that now makes
adding a reference to Office 11 behave differently than before?

Thanks for all your insights.

Bob

Aug 2 '05 #1
1 2561

I found the only way around this is to build your own Interop assembly and
not rely on VS to build it for you:
http://www.devcity.net/Articles/163/1/article.aspx

-- scott

"Bob N5" wrote:
I am working on an application that uses interop to do some simple operations
with both Excel and Word. I have most of functionality working, but ran into
issues on making things work with both versions of office. My questions are:

1. What is the 'best' practice for building an application that will work
with both versions of office? Do I need to have a separate build with
different references for each?

2. Can I install interop for Office XP and have it co-exist nicely on my
development box (VS 2003, Office 2003)? I tried installing the Office XP
interop and now it seems that Visual Studio has been confused by this -- now
when I put a reference in to the Microsoft Office 11 Object Library, only
single reference to Microsoft.Office.Core is added which is different than
before when references to Excel and Word (and possibly other) were
automatically added.

So the question really is two parts -- what's the 'correct' way to build for
both environments, and as a secondary question, what did I do that now makes
adding a reference to Office 11 behave differently than before?

Thanks for all your insights.

Bob

Sep 7 '05 #2

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

Similar topics

3
by: Dent2 | last post by:
I wrote a nice C# excel routine to automate the formatting of some raw CSV data. I wrote the routine on a WinXP computer with Visual Studio .NET 2003 and Office XP installed. It compiled and ran...
17
by: Mansi | last post by:
I need to do some research on how to use excel automation from c#. Does anyone know of any good books related to this subject? Thanks. Mansi
1
by: Bob N5 | last post by:
I am working on an application that uses interop to do some simple operations with both Excel and Word. I have most of functionality working, but ran into issues on making things work with both...
5
by: Mike in Santa Rosa | last post by:
I'm trying to get a simple c# app built that can launch/manipulate an excel workbook, sheet. I've chased down several examples and can't any of them to work. So I must be doing somethnig obviouslt...
10
by: Steve | last post by:
I am trying to create a DLL in Visual Studio 2005-Visual Basic that contains custom functions. I believe I need to use COM interop to allow VBA code in Excel 2002 to access it. I've studied...
0
by: liam_jones | last post by:
I'm very new to Python, well IronPython to precise, and have been having problems when using Excel. The problem I'm having is the closing of my Excel object. I'm able to successfully quit the...
2
by: Nicholas Dreyer | last post by:
The following error Run-time exception thrown : System.Runtime.InteropServices.COMException - Error loading type library/DLL. happens while running the code listed at the bottom of this...
2
by: John Heitmuller. | last post by:
Hi, I have a VB.Net application that I have recently upgraded from Visual Studio 2003 to Visual Studio 2005. The VB.Net app accesses Word and Excel. When I run the newly compiled VB.Net app on...
0
by: John Heitmuller. | last post by:
Hi, I have a VB.Net application that I have recently upgraded from Visual Studio 2003 to Visual Studio 2005. The VB.Net app accesses Word and Excel. When I run the newly compiled VB.Net app on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
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,...
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.