VBA - Detect if an application is installed to use it

Viewed 3313

I made an Excel file that store a lot of custom industrial parts' informations.
It allows users to send via Outlook a preformatted mail to ask for a new price.

Unfortunately, some users have "light" desktop without Outlook and they get an error :

Can't find Project or Library

Installing Outlook is unfortunately not an option, late biding already done.


I was thinking about preprocessor directives but I can't figure out how to use them in my case...

I know the constants that we can use for Windows and VBA versions : see here

I would have done something like this :

#If Outlook then
    MsgBox "Outlook is installed"
#Else
    MsgBox "Outlook is NOT installed"
#End if

But this will only detect if the code is run from Outlook or not, which is not what I need... :/


So I guess that I could do something this with On Error but it doesn't seem neat, any suggestions?

4 Answers
Related