Outlook 2000 addin fails when built on Windows XP/2003

  • Thread starter Thread starter jillgude
  • Start date Start date
J

jillgude

I am writing an Outlook addin using Visual Basic and CDO. If I build
my addin on Windows 2000, it runs successfully on Outlook 2000/XP/2003.
However, if I build the addin on a Windows XP or 2003 system, it fails
to successfully initialize when installed in an Outlook 2000 system.

The line of code that it seems to fail on is

Set mobjApp = olApp

where mobjApp is an Outlook.Application object and olApp is the
Outlook.Application object passed into the OnConnection method. The
Err object it is creating, gives the error "Type Mismatch", although
these objects are of the same type.

Any ideas as to why it seems my addin has to be built on a Windows 2000
system inorder to work with Outlook 2000?

Thanks!
 
When using VB, you should always build the addin on the machine with the
oldest version of Outlook that you plan to support.
The Outlook.Application object is not the same in both versions: Outlook
2002/2003 adds extra methods/properties and has a different GUID than
Outlook.Application in Outlook 2000. Outlook 2002/2003 still supports the
previous versions of course.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top