Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to determine which version of Microsof Office is run
Message
From
26/04/1998 09:15:14
 
 
To
24/04/1998 09:21:54
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00094608
Message ID:
00094961
Views:
24
>oe=createobject("Excel.Application")
>? oe.version
>
>>Zoran,
>>
>>With Word Basic you can use oWord.AppInfo(2). It will return a numeric version. Word '95 is version 7, Word '97 is version 8. I'm not sure if it will work with Excel, but you could try it.
>>
>>>Does anybody know how to determine which version of Microsoft office is currently on the machine,
>>>
>>>I have the following command
>>>
>>>OWord=CREATEOBJECT('Word.Basic') or oEx=GETOBJECT('Excel.chart')
>>>
>>>And after this commands I must know which version is running, because the methods and properties for the ver.95 and ver.97 are not the same.

Perhaps not as elegant, but what about querying the HKEY_LOCAL_MACHINE\Software\Microsoft\Office key? There should be a subkey for the version number (ie if Office 97 is installed, there is a subkey of '8.0') and under that, the actual installed components and some of their settings are available. This avoids launching the app if it isn't there at a minimum code cost...
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform