Determine if an Office application is installed

G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top