New Outlook.Application error

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi,

I have a Word 2003 template which puts a Task in Outlook 2003. This code has
been working well for a few years and still does on exisiting workstations

I am setting up some new workstations and get an error with the line:

Set ol = New Outlook.Application

It reports that a library is not referenced. I have "Microsoft Outlook 11.0
Object Library" ticked in the Visual Basic editor.

What else might be causing this issue?

Thanks,

John
 
If you get an error from code statements like these:

Dim ol as New Outlook.Application

Set ol = CreateObject("Outlook.Application")

the cause may be an anti-virus program on your computer that has a feature to block Outlook scripting. If so, the solution is to turn off the script blocking feature. You may need to contact technical support for your anti-virus program to find out how to do that.

I've also seen reports that setting the server parameter can resolve this problem in some situations:

Set ol = CreateObject("Outlook.Applicaton", localhost)
 
Thank you Sue.

I replaced "Set ol = New Outlook.Application" with your statement "Set ol =
CreateObject("Outlook.Application")" and it now works OK again. I'm sure you
would know why, I'm just happy it does.

Thank you.

John

If you get an error from code statements like these:

Dim ol as New Outlook.Application

Set ol = CreateObject("Outlook.Application")

the cause may be an anti-virus program on your computer that has a feature
to block Outlook scripting. If so, the solution is to turn off the script
blocking feature. You may need to contact technical support for your
anti-virus program to find out how to do that.

I've also seen reports that setting the server parameter can resolve this
problem in some situations:

Set ol = CreateObject("Outlook.Applicaton", localhost)
 
Back
Top