Outlook 2003 Classname

  • Thread starter Thread starter Simon Woods
  • Start date Start date
S

Simon Woods

Hi

Dim olapp As Outlook.Application
On Error Resume Next
Set olapp = CreateObject("Outlook.Application")
If olapp Is Nothing Then
Set olapp = GetObject("Outlook.Application")
End If

I've just changed machines and my new machine has Outlook 2003 installed. I
use to run a VB program to look in one of the Outlook journals on my old
machine running Outlook 2000. I've tried running it on my new machine and it
doesn't run. The Classname "Outlook.Application" seems to be unrecognised
generating a "Specifed Module could not be found" when executing the
CreateObject command.

Any suggestions?

Thanks

Simon
 
Some anti-virus programs have a script block that blocks access to CreateObject("Outlook.Application"). In any case, your code should attempt to use GetObject first, not CreateObject. If Outlook is already running, that should work OK.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top