Solved

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

Posted on 2006-07-03
25
1,085 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
[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
  • 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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
 

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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

726 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