Determine if an Office application is installed

D

Daren Freeman

Does anyone know of a way within Access VBA to determine if an Office
application is installed on a users workstation. I would like to enable or
disable certain functions within my application based on which office
applications are installed and also it would be helpful to know which version
of the office application is installed.
Thanks
 
D

Douglas J. Steele

You can try to instantiate an object, and check if there's an error.

For example,

Function ExcelInstalled() As Boolean
On Error Resume Next

Dim objExcel As Object

Set objExcel = CreateObject("Excel.Application")
ExcelInstalled = (Err.Number <> 429)
Set objExcel = Nothing

End Function
 
Top