New Outlook.Application Causes Error

7

737jetjock

In VB6, all my code works if I use an existing instance of Outllook,
but if I try to instantiate a new instance, I get Error 2147023782.
This happens if I use early or late binding. Both of the following code
snippets fail:

Dim objOutlook As Outlook.Application
Set objOutlook = New Outlook.Application

Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")

This problem just started. The only thing I have changed recently on my
computer is installing a new version of Norton SystemWorks.

Can anyone give me any ideas as to how to fix the problem?

Thanks,

Mike
 
7

737jetjock

Thanks for the suggestion, Ken. Actually, I tried that as well as
disabling Norton AV and Norton Internet Security. I still got the
error. However, I have since found a solution to the problem. If I
replace the following code:

Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")

with:

Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application", "localhost")

the error doesn't occur. I'm not sure why the "localhost" argument was
suddenly required to work, when it wasn't required before, but at least
it works.

Thanks,

Mike
 
K

Ken Slovak - [MVP - Outlook]

That looks like something Norton screwed up. Localhost is what Norton
substitutes for your email servers so it can intercept outgoing/incoming
emails to scan them. I've never heard of it anywhere else related to Outlook
as long as you're running locally and not under some Web hosted application.
 
7

737jetjock

That could be. I passed the info along to Symantec. Hopefully, if they
did something to cause it, they will fix the problem.

Mike
 
Joined
Jun 7, 2010
Messages
3
Reaction score
0
The code

Dim objOutlook As Object
> Set objOutlook = CreateObject("Outlook.Application", "localhost")


doesnt work for me.
I am using windows 7
 

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