Outlook 2000 addin fails when built on Windows XP/2003



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?


Dmitry Streblechenko

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)
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

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