Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I find if MS office is installed and what versio
Message
 
 
To
09/12/2005 19:07:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01076815
Message ID:
01076819
Views:
19
This message has been marked as the solution to the initial question of the thread.
Bob,

I have Office 2003 on my PC and all 3 versions of OWC controls. Looks like there isn't one to one correspondence between them. Anyway, each OWC control has it's own CLSID so you can check for them in the registry. Here's a sample code for Chart control. I used WSH to read registry for simplicity. You can use your favorite method.
oShell = CreateObject("WScript.Shell")

lcOwcChart9  = "{0002E500-0000-0000-C000-000000000046}"
lcOwcChart10 = "{0002E546-0000-0000-C000-000000000046}"
lcOwcChart11 = "{0002E55D-0000-0000-C000-000000000046}"

lcChartVersions = ""

TRY
	oShell.RegRead("HKCR\CLSID\" + lcOwcChart9 + "\")
	lcChartVersions = lcChartVersions + ", 9"
CATCH	
ENDTRY		

TRY
	oShell.RegRead("HKCR\CLSID\" + lcOwcChart9 + "\")
	lcChartVersions = lcChartVersions + ", 10"
CATCH	
ENDTRY		

TRY
	oShell.RegRead("HKCR\CLSID\" + lcOwcChart9 + "\")
	lcChartVersions = lcChartVersions + ", 11"
CATCH	
ENDTRY		
? SUBSTR(lcChartVersions,3)
>I need help in finding the VFP 8 command that helps me verify if Microsoft Office is installed on a PC and what version of MS office installed.
>
>The reason I need this is to check If I use Office Web Components (OWC) for office 2000 / XP or OWC10 for office 2003
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform