By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,127 Members | 1,160 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,127 IT Pros & Developers. It's quick & easy.

Excel/Word interop for both Office 10 & 11

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a

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.