dillweed
December 2nd, 1999, 09:29 PM
My program sends an email using Outlook. It works fine if I set reference to MSOUTL9.OLB since I have Outlook 2000 installed. However, it doesn't work on a machine with Outlook 97 installed. I have to recompile my program with the reference set to MSOUTL8.OLB in order for it to work. Any suggestion to work around both versions of Outlook ?
Chris Eastwood
December 3rd, 1999, 09:00 AM
The only suggestion that springs to mind is to create all of your Outlook Objects as 'Late Bound', eg
Dim oApp as Object
set oApp = CreateObject("Outlook.Application")
- Just hope that they haven't changed the object model too much.
You could also copy all of your Outlook specific code into a separate DLL (using a custom Interface - 'Implemented'). This would allow you to ship two different versions of your DLL (or even more, Outlook 97/98/2000). Your ActiveX DLL could even call the Outlook Application object late bound and query it to see what version is installed, then return to your program the correct object to use from your ActiveX DLL.
Just a thought.
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb