Runtime error 80004005 Creating Outlook.Application

D

Dave

Anyone

When trying to create the Outlook Object model from within a VB application
I get Runtime error 80004005 Creating Outlook.Application object. The PC is
running Windows XP Home with Outlook 2003. I've tried messing around with
internet security settings, I tried the Sue Mosher suggestion of looking for
script blocking and turning it off. I have turned off firewalls pretty much
everything I can think off. Anyone have any other ideas ?

Dave

Code will throw the error on either the New Outlook.Application or
CreateObject("Outlook.Application")

On Error Resume Next
Set g_oe = New Outlook.Application
If (err.Number <> 0) Then
err.Clear
Set g_oe = Nothing
Set g_ol = CreateObject("Outlook.Application", "localhost")
If (err.Number <> 0) Then
err.Clear
Set g_ol = Nothing
Exit Sub
End If
Set g_ns = g_ol.GetNamespace("MAPI")
Else
Logit "frmContacts - Done Loading Outlook Object"
Set g_ns = g_oe.GetNamespace("MAPI")
End If
Set g_fldr = g_ns.GetDefaultFolder(olFolderContacts)
 
K

Ken Slovak - [MVP - Outlook]

The most likely problem is a script stopper if New doesn't work and Outlook
is installed and can run.

Why
Set g_ol = CreateObject("Outlook.Application", "localhost") ?

I always just use CreateObject("Outlook.Application")
 
D

Dave

Does Windows XP have any script stopper features ? Like the security zone
settings that would cause this type of problem ? I'm running AVG antivirus,
but I completely removed it and I still have the problem.

I actually have it coded as CreateObject("Outlook.Application"), the
localhost addition was desperation, I saw it in a news group post and
thought I'd try it

I looked at the keys in the registry that Sue Mosher noted in a post but I
have not script blocking DLL reference in there.

Any other ideas ?
 
K

Ken Slovak - [MVP - Outlook]

No other ideas. AVG doesn't have a script stopper, I use it here on all my
network machines.
 
D

Dave

You know I've had customers bring this to my attention in the past. It's
been an on going problem reported. I know about the script blockers and
have helped users disable them so they can use our applications. For the
first time I actually have a PC that exhibits this problem in my possession
and for the life of me I have no idea what to do to it to get it to work.

This PC is XP Home edition, its the only PC that I have that's got home
edition on it.

Is it possible you think the the object model references have been messed up
? Do you know how to verify them or fix them ? Like re-register them some
how.

Thanks
Dave
 
K

Ken Slovak - [MVP - Outlook]

You could try running Detect and Repair and see if that helps.
 
D

Dave

Shoot, you're not going to believe it, that fixed it. You know I always
thought that detect and repair was useless and never fixed anything.

Thanks
Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top