here is the code we use and I know it works for Win2000:
Set OfficeProgram =3D GetObject(, "Outlook.Application")
If Err Then
Err.Clear
Set OfficeProgram =3D CreateObject("Outlook.Application")
End If
If Err.number =3D 0 Then
'this checks to make sure it is Outlook 2000 or higher
If Left(OfficeProgram.Version, 1) < 9 Then
Set OfficeProgram =3D Nothing
Else
FindOfficeProgram =3D "outlook"
Exit Function
End If
End If
Err.Clear
-----Original Message-----
From: Nigel [mailto:nigel.parker@c...]
Sent: Thursday, March 29, 2001 4:42 AM
To: professional vb
Subject: [pro_vb] Checking for outlook in Win98 & 2000
Hi Everyone,
I have this code running on a win98 app to check if MS Outlook is
running.
Private Function IsOutLookRunning() As Boolean
Dim objOutlook As Outlook.Application
On Error Resume Next
Set objOutlook =3D GetObject(, "Outlook.Application")
IsOutlookRunning =3D (Err.Number =3D 0)
Set objOutlook =3D Nothing
Err.Clear
End Function
This app has now been installed on win2000 machines and this code
doesn't
detect outlook, can anyone offer any reason why?
Thanks
Nigel.