Problem with versions of word and outlook<[email protected]>

S

Sam Sole

Looking at the original question and subsequent answers, the problem posted by the original poster is a classic! Why does he needs withevents?
(1) Because withevents or callback interfaces is the only way to subscribe to the event of the object he is working with.
(2) If you use "withevents" there is no way (as far as my gazzillion years of programming experience goes) to use late binding...That is you cannot declare the objects as "objects" but must specifically reference the object model. If you reference the object model, then there lies the original posters problem: How to subscribe to events using early binding without version compatibility issues.
The answer is simple: You can't!! But there are work arounds:
(1) If the object has a good backward compartibility model, compile your binary using the oldest version you can that has your required features. Newer versions on the target client might adapt well, but anything older than your referenced version will caput.
(2) Compile you binary using different versions of the object (costly). Check for the target client's version and install the correct version of your app.
(3) Use callbacks and interfaces! I digress!! I wouldn't wish this on my enemy.

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top