Loading the correct MS Office references depending on the Office version?
Hi,
I was using Office 2003 with a C# project, and after installing Office 2007 i realized that in the References section of the project, the Office 2003 items were invalid and would no longer work. Is there a way to dynamically add the correct reference?
Re: Loading the correct MS Office references depending on the Office version?
are you talking about Project -> add reference -> browse tab. which allows you to browse to another reference?
Or are you talking about from an already created working program?
Re: Loading the correct MS Office references depending on the Office version?
I guess I'm a confused person! :afrog:
i was talking about project properties, but it also worried me thinking that i need to have 2 separate versions of hte program for office 2003 and office 2007 (connection strings for different versions of Excel seem different anyways). Let me rephrase the question.
Is there a way to
1) determine the MS Office version at runtime to use the correct connection string.
2) would i need to load the correct version of office references (the one we add to project-> add reference) at runtime? If i already have added Office 2007 references to my project, would my compiled program work fine on a machine running Office 2003?
Re: Loading the correct MS Office references depending on the Office version?