Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Check for Compatibility Pack

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

TIA
Reinhard

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 37
Default Check for Compatibility Pack

Here is one possible approach.

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

Sub CheckForCompatabilityPack()

Const HKEY_LOCAL_MACHINE = &H80000002

Dim packInstalled As Boolean

strComputer = "."
packInstalled = False

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

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninsta ll"
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



"Reinhard Thomann" wrote in message
...
Hi,
how to check with VBA whether Office 2007 Compatibility Pack is installed
on computer?

TIA
Reinhard



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Check for Compatibility Pack

Hi Steve,

good solution. Many thanks for your help.

Regards
Reinhard

"Steve Yandl" schrieb im Newsbeitrag
...
Here is one possible approach.

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

Sub CheckForCompatabilityPack()

Const HKEY_LOCAL_MACHINE = &H80000002

Dim packInstalled As Boolean

strComputer = "."
packInstalled = False

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

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninsta ll"
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



"Reinhard Thomann" wrote in message
...
Hi,
how to check with VBA whether Office 2007 Compatibility Pack is installed
on computer?

TIA
Reinhard




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compatibility Pack settings? BABs Excel Discussion (Misc queries) 1 January 14th 10 11:18 PM
How to disable 2007 compatibility pack? igivanov Excel Discussion (Misc queries) 0 August 11th 09 05:29 PM
Compatibility Pack for Office 2007 Margaret Excel Discussion (Misc queries) 3 July 30th 09 09:54 PM
xlsx won't open with compatibility pack MKG Excel Discussion (Misc queries) 0 June 26th 09 04:04 PM
03' (+ compatibility pack) users viewing 07 jasonr17 Excel Discussion (Misc queries) 2 March 4th 09 12:59 AM


All times are GMT +1. The time now is 09:03 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"