Problems creating ActiveX object using Extended MAPI

Posted on 2002-03-21
Last Modified: 2006-11-17

Back in March 2000 I developed a program which uses Extended MAPI to created and send e-mails via Microsoft Outlook. I had some problems creating the RTF format e-mail but fortunately managed to sort it all out with the help of "Neo" among others on this website. The program has since been running perfectly well on the target computer (it was developed for one specific client and has, up to now, been used on just the one computer). However, my client decided to install the system on another computer as well and when he did this it turned out that the Extended MAPI would not function correctly on it! Whenever it reaches the line of code which should create the MAPI.Session object it fails, with the 429 error message! I cannot see why this should be, in fact I have also tried installing the program on three other computers and it produces exactly the same error on all three, yet it is still working perfectly on the original computer on which it was installed! I have checked for files, etc., as I assumed that perhaps a file had become missing or corrupted, but even after replacing all the MAPI files and OLEMSG.DLL, file, etc. with ones from the development machine (on which it also still works fine), it still seems to show the same problem. I am now reaching the point where I will be bald very soon so, if anyone can help I would be extremely grateful. I am prepared to "go back" over everything and perhaps a fresh mind on the subject may point out something which I have missed (which could of course be very simple), so please don't worry about making "basic" suggestions; I will follow them all through. I need someone now with a "detached" view to "direct me". Thanks in anticipation of your assistance!! Cheers.

CBIT Services.
Question by:cbitservices
  • 2

Expert Comment

ID: 6885334
LVL 16

Accepted Solution

Neo_mvps earned 300 total points
ID: 6885557
What revision of Outlook where they running on the old machine and where you using the Outlook Object model or Collaboration Data Objects 1.21 (CDO)?

What revision of Outlook are they running on the new machine and did they remember to install Colaboration Data Objects 1.21?

The reason that I ask is that the 429 error just means that the application couldn't create the object.  This means that the library could not be installed (e.g. Collaboration Data Objects is not installed by default under Outlook 2000/2002, installed by default under Outlook 98, and doesn't come with Outlook 97.)

Another likely scenerio is that the library is installed but just not registered.  An easy way to check is to review the registry.  For example, open the registry editor and open the HKEY_Classes_Root.  Have the person look for MAPI.Session and try to follow the pointers to see which DLL file it points to. (odds are it is cdo.dll on Outlook 98 and later.)

Outside of that, have the client be very wary of some of the later security fixes for Outlook 98 and later.  Some of these patches will remove CDO or replace it with a version that can cause the application to fail.

Author Comment

ID: 6885838
Thanks jbil,

The problem is, I think to do with "support" files, etc., and have done from the start which is why I think Neo could be right with his suggestions. Thanks for you comment anyway and I will take another look at your suggestion if neo's comment doesn't produce the answer.



Author Comment

ID: 6886046
Thanks Neo for the quick, no nonsense solution! As I expected it was something quite simple but as I wasn't aware of this is wasn't simple for me! Thanks again,


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question