New Outlook.Application Causes Error

  • Thread starter Thread starter 737jetjock
  • Start date Start date
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
 
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
 
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.
 
That could be. I passed the info along to Symantec. Hopefully, if they
did something to cause it, they will fix the problem.

Mike
 
The code

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


doesnt work for me.
I am using windows 7
 
Back
Top