Office object library versions

DavyEFC

Well-known member
Joined
Dec 17, 2010
Messages
51
Programming Experience
5-10
This has bugged me for a while and i'm hoping for some 'train of thought' advice to aid my learning.

On my laptop i have office 2010. I write an app that pulls in data from an excel spreadsheet. That app references 'Microsoft Excel 14.0 Object library' and 'Microsoft Office 14.0 Object library'. Then i run it on my work laptop (which has office 365 on it) and the app gets a cob-on because that laptop obviously doesn't have the v14 libraries but rather v16s.

My question is this: Can (and if so how) do i make my app work independent of office version? Can i copy certain libraries and have them in the exe directory? If that's not a way to go then what is? There must be some way of making my app 'future proof' (within reason!) Next thing the libraries will change to v17 and the whole issue starts again!
 
Hmmm... just reading about 'Automatic Binding Redirection'.
If i develop on the machine that has the older version of office on it (which i do) and compile to framework 4.5.1 and presumably later (which i do) then run the compiled .exe on the machine with the newer office version on it then automatic redirection to the newer libraries takes place and all runs well. Is that a true statement? Am i on the right tracks with that? Is it really that simple?
 
Back
Top