[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1096
  • Last Modified:

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.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
pauldonson
Asked:
pauldonson
  • 11
  • 9
  • 3
  • +1
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
rockiroadsCommented:
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
 
rockiroadsCommented:
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
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
pauldonsonAuthor Commented:
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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
pauldonsonAuthor Commented:
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
 
pauldonsonAuthor Commented:
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
 
rockiroadsCommented:
Have u checked the dll file and to see if its been registered?

0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
pauldonsonAuthor Commented:
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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Any way they will let your use Remote Desktop to do this? I've used this before in the past with good results.
0
 
pauldonsonAuthor Commented:
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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
pauldonsonAuthor Commented:
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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
Does it still fail on the CreateObject line? Can you post the whole code segment dealing with your email, including the Dim statements?
0
 
pauldonsonAuthor Commented:
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
 
pauldonsonAuthor Commented:
It is the line:

Set objOutlook = CreateObject("Outlook.Application")

that is failing.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
pauldonsonAuthor Commented:
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
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
pauldonsonAuthor Commented:
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
 
pauldonsonAuthor Commented:
Finally resolved it. Reinstalled Outlook 2003 and it fixed it.

Thanks to everyone for their suggestions.
0
 
jjafferrCommented:
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

  • 11
  • 9
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now