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