Freshman
Registered User.
- Local time
- Today, 09:57
- Joined
- May 21, 2010
- Messages
- 437
Hi all,
I've been using the bottom function for a few years but recently tested it due to a time delay at a Client and found it now suddenly shows 'False' in the test code on my machine even though I'm running Outlook on mine.
Could it be because I run Access 2003 but Outlook 2013 ?
Is there a more sure way of testing for Outlook covering all versions?
Thanks
I've been using the bottom function for a few years but recently tested it due to a time delay at a Client and found it now suddenly shows 'False' in the test code on my machine even though I'm running Outlook on mine.
Could it be because I run Access 2003 but Outlook 2013 ?
Is there a more sure way of testing for Outlook covering all versions?
Thanks
Code:
Function ApplicationIsAvailable(ApplicationClassName As String) As Boolean
Dim AnyApp As Object
On Error Resume Next
Set AnyApp = CreateObject(ApplicationClassName)
ApplicationIsAvailable = Not AnyApp Is Nothing
Set AnyApp = Nothing
On Error GoTo 0
End Function
Code:
Public Function TestForApp()
MsgBox ApplicationIsAvailable("Outlook.application")
End Function