Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Choose Excel version
Message
From
01/04/2014 19:23:07
 
 
To
01/04/2014 10:29:39
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP3
Network:
Windows XP
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01597666
Message ID:
01597933
Views:
50
>>>Hi. To open Excel, I give a command like:
>>>
>>>
>>>loExcel = CreateObject("Excel.Application")
>>>
>>>
>>>On one machine, there are two versions of Excel installed; I think it's Excel 2003 and 2007. Is there a way to control what version of Excel will be opened?
>>>
>>>This is actually solved already, in the sense that the corresponding user decided to remove the old version of Excel. But I was still curious whether there is any way to control this.
>>
>>you could save registry status, set values to point to old versions, call and reset afterwards. No, not reccommended, not even experiments ;-)
>>Could work with older DDE - don't you set a path there to the corresponding exe if needed ?
>
>I don't know about paths; all I ever did was invoke Excel with the CreateObject("Excel.Application") instruction; I never worried about where it might be installed.

And that is quite ok, as the registry entries point to the installed version. Without massaging the registry you must call the Excel-Version explicitly, so pathing jumps into the issues. You could search the registry for installed versions, offer the user those found and open that one. If your code works via DDE, you should be home free, if not I think there was a way to ask for COM from running programs, so that could possibly be an answer to your question I boldly embolded ;-)
Previous
Reply
Map
View

Click here to load this message in the networking platform