Check for Compatibility Pack

R

Reinhard Thomann

Hi,
how to check with VBA whether Office 2007 Compatibility Pack is installed on
computer?

TIA
Reinhard
 
S

Steve Yandl

Here is one possible approach.

'--------------------------------------

Sub CheckForCompatabilityPack()

Const HKEY_LOCAL_MACHINE = &H80000002

Dim packInstalled As Boolean

strComputer = "."
packInstalled = False

Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys

For Each Subkey In arrSubKeys
If Subkey = "{90120000-0020-0409-0000-0000000FF1CE}" Then
packInstalled = True
End If
Next

If packInstalled Then
MsgBox "Compatability Pack for Office 2007 installed"
End If

Set objReg = Nothing

End Sub


'-------------------------------------

Steve Yandl
 

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