View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Excel registry key

FWIW, Office 10 and 9 have similar keys

Office 10:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared
Tools\MSInfo\Categories\Applications10\Excel10]

Office 9:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared
Tools\MSInfo\Categories\Applications\Excel]

You could also look for

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\X.0\C ommon\InstallRoot]

which contains a key named 'Path' with the installation directory of that
version of Office. This is consistent for Excel 8.0 through 12.0. If you
want to look for a specific product, use Excel, Word, Access, etc., in place
of Common.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Howard Kaikow" wrote in message
...
"Jon Peltier" wrote in message
...
XP: Yes. Why do you ask?


The usual method for displaying a string that identifies the version of a
program, in this case Excel, is to start the app, get the version and then
use a Select Case or If to determine which string to display.

A better, or more general, way would be to use the API to first see
whether
the app is installed.
If installed, determine the version specific progid, then get the "title":
of the prog from the registry BEFORE opening the program.

This eliminates the need to hard code titles within programs, and, as long
as MSFT does't change things, eliminates the need to change the program,
for
this purpose, by hard coding titles of future versions.

Being masochistic, I looked thru the registry and found the key I
referenced.
If the same key is available in Win 2000, XP and Vista, the hard coding
of
titles is not necessary,

Of course, I have tested this only for Excel 2003, not yet for Excel 97,
2000, or 2002.
I expect to do this next week.

"Howard Kaikow" wrote in message
...
Does the following key exist in the Windows XP and Windows Vista
registries
for an installed Excel?
The example is for Excel 2003 (version 11).

'[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared
Tools\MSInfo\Categories\Applications11\Excel11]