|
|
Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
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)
|
|
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")
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
"Dave" <KingOfTheBeach[ at ]community.nospam> wrote in message news:OW2datrpGHA.4988[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text] > 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) > > >
|
|
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 ?
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> wrote in message news:edwcnu0pGHA.148[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text] > 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") > > -- > Ken Slovak > [MVP - Outlook] > http://www.slovaktech.com > Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 > Reminder Manager, Extended Reminders, Attachment Options > http://www.slovaktech.com/products.htm > > > "Dave" <KingOfTheBeach[ at ]community.nospam> wrote in message > news:OW2datrpGHA.4988[ at ]TK2MSFTNGP04.phx.gbl... > > 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) > > > > > > >
|
|
No other ideas. AVG doesn't have a script stopper, I use it here on all my network machines.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
"Dave" <KingOfTheBeach[ at ]community.nospam> wrote in message news:uGewSR1pGHA.3908[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text] > 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 ?
|
|
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
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> wrote in message news:OlA2cGbqGHA.1140[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text] > No other ideas. AVG doesn't have a script stopper, I use it here on all my > network machines. > > -- > Ken Slovak > [MVP - Outlook] > http://www.slovaktech.com> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 > Reminder Manager, Extended Reminders, Attachment Options > http://www.slovaktech.com/products.htm> > > "Dave" <KingOfTheBeach[ at ]community.nospam> wrote in message > news:uGewSR1pGHA.3908[ at ]TK2MSFTNGP05.phx.gbl... > > 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 ? >
|
|
You could try running Detect and Repair and see if that helps.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm
"Dave" <KingOfTheBeach[ at ]community.nospam> wrote in message news:uYyqjXeqGHA.2440[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text] > 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
|
|
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
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> wrote in message news:Ok3yfBnqGHA.4912[ at ]TK2MSFTNGP05.phx.gbl...
[Quoted Text] > You could try running Detect and Repair and see if that helps. > > -- > Ken Slovak > [MVP - Outlook] > http://www.slovaktech.com> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 > Reminder Manager, Extended Reminders, Attachment Options > http://www.slovaktech.com/products.htm> > > "Dave" <KingOfTheBeach[ at ]community.nospam> wrote in message > news:uYyqjXeqGHA.2440[ at ]TK2MSFTNGP03.phx.gbl... > > 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 >
|
|
|