Home > Archive > Visual Basic > February 2005 > Detecting Access vs. Access Runtime
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Detecting Access vs. Access Runtime
|
|
| Tim R. 2005-02-24, 3:55 pm |
| Hello,
I am trying to detect installations of Office Products using the following
code:
Public Function WordInstalled() As Boolean
Dim objWord As Object
On Error Resume Next
Set objWord = CreateObject("Word.Application")
If objWord Is Nothing Then
WordInstalled = False
Else
WordInstalled = True
End If
End Function
Works great for Word and Excel, but Access runs into a problem. The Access
function does not return an access installation if Access runtime is the only
application installed; however, if Word or Excel or some other Office App is
installed on the same machine, the Access Function *does* return a
false-positive for an Access Installation.
Is there some way to detect an Access installation that will not also return
Access Runtime Installations?
Thanks in advance!
| |
| Paul Clement 2005-02-24, 8:55 pm |
| On Thu, 24 Feb 2005 08:57:07 -0800, Tim R. <Tim R.@discussions.microsoft.com> wrote:
¤ Hello,
¤
¤ I am trying to detect installations of Office Products using the following
¤ code:
¤
¤ Public Function WordInstalled() As Boolean
¤ Dim objWord As Object
¤ On Error Resume Next
¤ Set objWord = CreateObject("Word.Application")
¤ If objWord Is Nothing Then
¤ WordInstalled = False
¤ Else
¤ WordInstalled = True
¤ End If
¤ End Function
¤
¤ Works great for Word and Excel, but Access runs into a problem. The Access
¤ function does not return an access installation if Access runtime is the only
¤ application installed; however, if Word or Excel or some other Office App is
¤ installed on the same machine, the Access Function *does* return a
¤ false-positive for an Access Installation.
¤
¤ Is there some way to detect an Access installation that will not also return
¤ Access Runtime Installations?
You may have to trap the error that occurs under the following scenario:
Using automation causes a Run-Time Error when only the Microsoft Access Runtime is installed on a
computer
http://support.microsoft.com/kb/295179/EN-US/
Paul ~~~ pclement@ameritech.net
Microsoft MVP (Visual Basic)
|
|
|
|
|