CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 1999
    Posts
    18

    Microsoft Outlook

    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 ?


  2. #2
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: Microsoft Outlook

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured