How to determine version of MS Office installed programmatically?

  • Thread starter Thread starter Leonid Lastovkin
  • Start date Start date
L

Leonid Lastovkin

I would like to be able to find out which version of Microsoft Office
is installed on the host computer. How can I implement this query in
C#? I do not need the whole program, but a relevant code snippet will
be appreciated.

Thanks.
 
Just a suggestion:

Search the registry at:
HKEY_LOCAL_MACHINE\Software\Microsoft\Office

if it exists then office was or is on the machine.

now incremently search version so:

For Version: Office 2003: Add to Reg Path \11.0\InstallRoot\ and get
the value of the 'Path' label which on my machine is C:\Program
Files\Microsoft Office\OFFICE11\

To check for Word do a filysystem file check if exist for WINWORD.EXE, for
Excel : EXCEL.EXE etc.

------
For Version: Office 2007: Add to Reg Path: \12.0\InstallRoot\ and again
get the value of the 'Path' lebel which on my machine is C:\Program
Files\Microsoft Office\Office12\

To check for Word do a filesystem file check if exist for WINWORD.EXE etc.

If the relevent version(s) do not exist then you will get a no value found
returned from the read registry functions.

I don't have the time to write some code, but i'm sure you can google for
it.

try going to www.planetsourcecode.com very helpfull for the beginner.


Hopes this help

Paul R
 

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

Back
Top