471,337 Members | 941 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 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 2366

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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dent2 | last post: by
17 posts views Thread by Mansi | last post: by
5 posts views Thread by Mike in Santa Rosa | last post: by
reply views Thread by liam_jones | last post: by

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.