Solved

Run time error 429: ActiveX Component can't generate object

Posted on 2006-07-03
25
1,077 Views
Last Modified: 2008-01-09
Hi, I have one of my team out on site training one of our databases (An Access ADP connected to SQL 2000) to a client. On one of the client machines whenever they try to do something involving Email it stops with the following error:

Run time error 429: ActiveX Component can't generate object.

We have pinned the error down to one line:

Dim appOutlook As Object
Set appOutlook = CreateObject("Outlook.application")    <-- this line here

(note that we have to use late binding because of different versions of Outlook on the clients)

There seems to be a lot written about this problem but none seem to fit exactly with my circumstances.

The client PC has Access 2000 installed (which shouldn't be used for our app), Outlook 2003 and then our application which uses the Access 2003 runtime.

The PC next to it is identically setup and doesn't have the same issue.

I have tried reinstalling the access 2003 runtime package to no avail.

Does anyone have any suggestions please?

0
Comment
Question by:pauldonson
  • 11
  • 9
  • 3
  • +1
25 Comments
 
LVL 84
ID: 17030238
How did you verify this line with the runtime? Just curious ...

Is this an .mde file? If not, then I'd do this:

1) Reference the Outlook library. Do a compile and make sure all is well
2) Convert your code to early binding. Do a compile, then test your code.
3) If that works, covert back to late binding, do a compile, and test your code.
4) If all works, then de-reference the Outlook library and try your app again with the runtime.

Note that if your db is an .mde file, you can use the A2000 installed on the machine to bulid a small Test.mdb file and do the same thing
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17030284
Could be for a number of reasons, a lot of which specified by LSMConsulting

Have a look at the MS Article for common causes
http://support.microsoft.com/kb/q296205/

The other thing is possibly the DLL used is missing? e.g.  msoutl9.dll   Not sure what number it is for whatever version your using
Or if its there, there is no permission hence why u cannot create the object

The other thing, not sure if it applies to outlook, I dont think so, but I do know it applies to some active-x controls. You may have a runtime licence not a design one

0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17030363
Another thing, if u have msoutl9.dll, it must be registered
Could it have something to do with A2000 installed but Outlook2003 running? Perhaps A2003 runtime does not have the right dll

0
 

Author Comment

by:pauldonson
ID: 17030378
LSMConsulting: I got the error by converting my 2003 adp file to 2000 and then running it natively on the suspect PC.

rockiroads: Yes, I too suspect it something to do with the 2000 being installed already - I am waiting for the client's permission to remove 2000 and then reinstall 2003 runtime.

Thanks to you both for the suggestions so far, I will keep you posted!
0
 
LVL 84
ID: 17030448
I doubt removing 2000 will solve this problem - could be a problem with Outlook. Have they had any other issues on that machine? e.g. email troubles, Outlook suddenly shutting down, etc etc

Does your application start? Can you use other features of the application?

0
 

Author Comment

by:pauldonson
ID: 17030466
The application works fine apart from anything that uses email. I will check with the client if she has had any other problems on this machine.
0
 

Author Comment

by:pauldonson
ID: 17030529
Client confirms she has not had any other problems with Outlook.

What is my easiest first move on this do you think? Bearing in mind I am off-site and don't really want a visit if I can help it! They do have an IT guy who might be able to do something for me.
0
 
LVL 65

Expert Comment

by:rockiroads
ID: 17030611
Have u checked the dll file and to see if its been registered?

0
 
LVL 84
ID: 17030616
First thing I'd do is verify that Outlook is functioning correctly and can be automated: I'd build a test db (do it in the .mdb format) which references the Outlook library ... include stripped down code that would send a simple test email. This will verify that Access can indeed automate OUtlook. Note that, depending on the Outlook version on your machine, your onsite guy may need to remake the references (i.e. if your dev machine has Outlook 2003 installed and the enduser has OUtlook 2002, the reference won't automatically "degrade").

0
 
LVL 84
ID: 17030652
I'd doubt the outlook dll file has become de-registered, since Outlook does function, but it's certainly worth a try.

If the first test works okay, then I'd send out another db (again in the 2000 format) where you've switched to Late Binding ... see if this functions.

If the second test works okay, then have them test it in the runtime environment. A batch file with these lines should do the trick:

@Echo Off
"Full path to MSACCESS.EXE" "Full path to your test db" /runtime

Note that you'd want the path to the 2000 MSACCESS.EXE

If that works, then change the batch file to point to your runtime version:

@Echo Off
"full path to runtime access" "full path to your test db"

Basically, narrow down your options ... i.e. if your code works with early binding, then you know that OUtlook is functioning correctly, and that access can "talk" with it ... you can then move on to look at other things which could cause this (for example, has this machine been updated via the Office Update site - if so, what SP level is OUtlook, etc etc).
0
 

Author Comment

by:pauldonson
ID: 17030776
OK, thanks for the pointers - I will need to organise a trip to the site to try these things out. I will let you know how I get on.
0
 
LVL 84
ID: 17032282
Any way they will let your use Remote Desktop to do this? I've used this before in the past with good results.
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:pauldonson
ID: 17035663
Yeah, I have got the details for the Remote Desktop but my network won't connect to theirs for some reason! (I suspect my firewall) I can connect from home fine.
0
 
LVL 84
ID: 17036437
It's probably their firewall - most likely they don't have port 3389 opened up.

Another alternative is www.logmein.com, the free version ... quick and easy, although not quite as robust as RD, but it'll do in a pinch and may save you a trip.
0
 

Author Comment

by:pauldonson
ID: 17144399
Right, I have installed the full version of Access 2003 on the machine in question, I have tested the send email using early and late binding. It works fine with early binding but still fails when I use late binding.

Any ideas?
0
 
LVL 84
ID: 17144958
Does it still fail on the CreateObject line? Can you post the whole code segment dealing with your email, including the Dim statements?
0
 

Author Comment

by:pauldonson
ID: 17145004
This is the code for late binding:

Private Sub Command0_Click()
Dim objOutlook As Object

Dim Message As Redemption.SafeMailItem

Dim oItem

Set objOutlook = CreateObject("Outlook.Application")

Set Message = CreateObject("Redemption.SafeMailItem")

Set oItem = objOutlook.CreateItem(0)

With Message
    .Item = oItem
    .Recipients.Add "pdonson@xyz.com"
     .subject = "XYZ UK Ltd - Terms of Business LATE BINDING"
     .body = "Further to our telephone conversation today, please find attached a copy of our Terms of Business." + vbCrLf + vbCrLf
End With

Message.display

Set objOutlook = Nothing

End Sub
0
 

Author Comment

by:pauldonson
ID: 17145006
It is the line:

Set objOutlook = CreateObject("Outlook.Application")

that is failing.
0
 
LVL 84
ID: 17145069
Odd ... I just tried your code block in my Access 2003 install and it worked fine (except the Redemption part, which I don't have installed on this machine). I was able to get past your trouble line, however, and send a test email after changing a few lines to remove the Redemption stuff.

Have you seen this KB article:
http://support.microsoft.com/?id=828550
0
 

Author Comment

by:pauldonson
ID: 17145099
Yeah, this code works fine all of the machines I have installed it on except one!

I might just swap the base unit, cheating I know but we have to resolve it.
0
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 17145198
That would, of course, work. I'm betting that you'll find some issues on the problem machine that would likely be resolved by a re-install of Office (or the OS), or by following the guidelines for re-referencing various dll files (as suggested by rocki earlier) in the link I provided earlier.
0
 

Author Comment

by:pauldonson
ID: 17145207
Yes, I am going to try reinstalling Outlook first. I don't know if it is significant but the PC in question has Office 2000 but has had Outlook 2003 added to it. The Access runtime is 2003.
0
 

Author Comment

by:pauldonson
ID: 17240412
Finally resolved it. Reinstalled Outlook 2003 and it fixed it.

Thanks to everyone for their suggestions.
0
 
LVL 27

Expert Comment

by:jjafferr
ID: 17256441
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup topic area:
    Accept: LSMConsulting {http:#17145198}

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

jjafferr
EE Cleanup Volunteer
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now