Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to detect the version of MS Office installed in the computer ?

Status
Not open for further replies.

Johnweida

MIS
Apr 29, 2003
91
CN
Experts,

I called some applications of MS Office such as Outlook,Excel and Word in my application and it running smoothly in MS Office 2000 and XP environment but failed in Office 97 environment.So I have to detect the verion of MS Office installed in the computer before the user clicking the button. How to do it ? Please help me. Thanks.

Merry X'mas and Happy New Year

John Satellite
 
experts,

o = createobject('Outlook.application')
? o.version
(10.0.0.4712)
e = createobject('Excel.application')
? e.version
(10.0)
w = createobject('Word.application')
? w.version
(10.0)

That means the version of MS Office installed in my computer is XP ?
if I can judge any verion of MS Office in this way ?
Thanks.

John Satellite
 
John,

Those numbers you see are indeed the official version numbers. If you need help in tying the numbers to the more familiar version names, check the About box in the respective applications.

For example, my copy of Excel 2000 tells me that the version number is 9.0., which is what I would expect. And I know Word 97 is version 8.0. Presumably 95 was 7.0, which makes sense as the one before that was Word 6.0.

Mike


Mike Lewis
Edinburgh, Scotland
 
You could use registry functions to check the value at:

HKEY_CLASSES_ROOT\Word.Application\CurVer
HKEY_CLASSES_ROOT\Excel.Application\CurVer
etc...

The last number in the value is the major version number.
 
All 3 of you have just saved me a bit of time. Thank you. I like the registry values check the best since it doesn't require creating an object so thank you to wgcs for that. Mike i appreciate the clarification on version numbers, and Johnweida thanks for starting this thread.


Slighthaze = NULL
craig1442@mchsi.com
"Whom computers would destroy, they must first drive mad." - Anon​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top