Solved

429: ActiveX Component can't create object - MAPI

Posted on 2004-04-21
16
1,243 Views
Last Modified: 2007-12-19
I'm using the following:

Set mapisession1 = CreateObject("msMAPI.mapiSession")
Set mapimessages1 = CreateObject("msMAPI.mapiMessages")

I get "429: ActiveX Component can't create object" when I run the program after installing it on a desktop without VB.

What reference am I missing that I need to include in the distributed package?


0
Comment
Question by:seckel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 4
  • +1
16 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10878714
Set mapisession1 = CreateObject("MAPI.mapiSession")
Set mapimessages1 = CreateObject("MAPI.mapiMessages")
0
 
LVL 1

Expert Comment

by:Idarac
ID: 10878733
You probably have to install the data access compnents separately.

Running the Mdac_typ.exe shoud install everything you need.

What do you have set in references in VB?
0
 

Author Comment

by:seckel
ID: 10878795
Idarac:

Do I run Mdac_typ.exe on the desktop before I run the setup.exe for my application?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:seckel
ID: 10878802
RanjeetRain:

How will that fix my problem?
0
 
LVL 19

Expert Comment

by:Shauli
ID: 10878892
Did you install the program, or just copied it to the machine's desktop? It looks like it missing the MSMAPI32.OCX, which should be included in the installation package. Did you create one at all?

S
0
 
LVL 1

Expert Comment

by:Idarac
ID: 10878957
Run Mdac_typ.exe on the desktop after your setup.

If you used the VB deployment wizard sometimes it misses the data access components.

0
 

Author Comment

by:seckel
ID: 10879339
Shauli

I installed using setup.exe created by the package & deployment wizard.  How do I add MSMAPI32.OCX to the package for deployement?
0
 
LVL 1

Assisted Solution

by:Idarac
Idarac earned 250 total points
ID: 10879567
You add it while creating your deployment package.

When you get to the include form during the setup you will see and add button.

Click on Add and a browse will come up navigate to the windows\system directory. It will then add it to the install.

As you continue through the setup you will get to a set locations form.

Set the directory to the WinSysPath

0
 
LVL 19

Accepted Solution

by:
Shauli earned 250 total points
ID: 10879577
Run P&D again, And go all the way till you reach the "Included Files" window. Scroll the list of files to see if the file is already there. If it is not there, then click ADD... and browse to \WINDOWS\SYSTEM32 and it should be there. Then continue the package all the way to the end.

Hope this helps,

S
0
 
LVL 1

Expert Comment

by:Idarac
ID: 10879708
A word for everyone if you can help it do not run the deployment package on XP. I have run into all kinds of install problems.

I keep a windows 98 machine to do my packaging on.
0
 
LVL 19

Expert Comment

by:Shauli
ID: 10879835
I tend to agree with that last statement, although win2k is quite safe, no need for win98. With that said, I would prefer innosetup http://www.jrsoftware.org/isinfo.php , much safer, far better and... free.

S
0
 

Author Comment

by:seckel
ID: 10880668
I included the MSMAPI32.OCX, but I still got the same error.  I even ran regsvr32 to register the ActiveX Control.  

Any other suggestions?
0
 
LVL 1

Expert Comment

by:Idarac
ID: 10880751

Show me a  list of the references and components in your project?
0
 
LVL 19

Expert Comment

by:Shauli
ID: 10880780
Do you have a reference to Outlook library? Maybe this is what is missing.
(Priject>reference>Outlook library.....)

S
0
 
LVL 1

Expert Comment

by:Idarac
ID: 10880876
Good point if you do have the outlook reference it may not match the version on your desktop.

Also the reference to Outlook should not be included in your install as it will already be installed by virtue of Outlook installed on the desktop computer?

0
 

Author Comment

by:seckel
ID: 10880944
I got it figured out.  This was the first time I used MAPI.  I was using a set statement and CreateObject statement.
I then discovered that there are MAPI component objects I could place on my form.  When I placed the objects on my form, it resolved all issues during the installation.

Thank you for your help - It was a good learning experience.
0

Featured Post

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Put text in a picture ASP.NET C# 2 73
VBA/SQL - Connect to SQL server and pull data 4 150
VBA filters 2 81
How to hault or freeze parent form when a 2d form is open in vb6 3 46
There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

734 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