How to check whether user has Office compatibility pack installed

B

bainite

Is there a way to check whether user computer has Office compatiblity pack
installed programatically? I'm writing an application to automate Word, and I
need to check this to decide whether to allow user to perform some operations.
I'm thinking about registry, but don't know where to look at.
 
D

Doug Robbins - Word MVP

Probably in \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\MOC

Looking at a machine that is running Office 2003 and has not had 2007
installed, but on which the compatibility pack has been installed, there are
a whole lot of settings in that location for matters dealing of 2007
applications - Word 2007 Document and Word 2007 Macro-enabled Document

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
G

Graham Mayor

You might also check the installer entries e.g.

Dim WSHShell, RegKey, rKeyWord, Result
Set WSHShell = CreateObject("WScript.Shell")
RegKey =
"HKEY_CLASSES_ROOT\Installer\Products\00002109020090400000000000F01FEC\"
On Error Resume Next 'The registry key does not exist
rKeyWord = WSHShell.RegRead(RegKey & "ProductName") ' but if it does read it
If rKeyWord = "Compatibility Pack for the 2007 Office system" Then
MsgBox "Compatibility Pack for the 2007 Office system - installed"
Else
MsgBox "Compatibility Pack for the 2007 Office system - NOT installed"
End If

This works for Word 2003, but I wonder if the long string of numbers is the
same with Word 2000/2002?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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