pauldonson
asked on
Run time error 429: ActiveX Component can't generate object
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.appl ication") <-- 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?
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.appl
(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?
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
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
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
Could it have something to do with A2000 installed but Outlook2003 running? Perhaps A2003 runtime does not have the right dll
ASKER
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!
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!
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?
Does your application start? Can you use other features of the application?
ASKER
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.
ASKER
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.
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.
Have u checked the dll file and to see if its been registered?
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").
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).
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).
ASKER
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.
Any way they will let your use Remote Desktop to do this? I've used this before in the past with good results.
ASKER
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.
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.
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.
ASKER
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?
Any ideas?
Does it still fail on the CreateObject line? Can you post the whole code segment dealing with your email, including the Dim statements?
ASKER
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.Appl ication")
Set Message = CreateObject("Redemption.S afeMailIte m")
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
Private Sub Command0_Click()
Dim objOutlook As Object
Dim Message As Redemption.SafeMailItem
Dim oItem
Set objOutlook = CreateObject("Outlook.Appl
Set Message = CreateObject("Redemption.S
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
ASKER
It is the line:
Set objOutlook = CreateObject("Outlook.Appl ication")
that is failing.
Set objOutlook = CreateObject("Outlook.Appl
that is failing.
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
Have you seen this KB article:
http://support.microsoft.com/?id=828550
ASKER
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.
I might just swap the base unit, cheating I know but we have to resolve it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
ASKER
Finally resolved it. Reinstalled Outlook 2003 and it fixed it.
Thanks to everyone for their suggestions.
Thanks to everyone for their suggestions.
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
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
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