Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP ole Excel question
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00259234
Message ID:
00259500
Views:
48
>I am sorry, I should have been more specific. I am working with VFP5.0
>I can't seem to open an excel sheet. I appreciate your help.\

There are a number of other ShellExecute classes that wrap the API functions for you, I still use David Frankenbach's. But here is the straight up API language to do what you need:

DECLARE INTEGER ShellExecute ;
IN SHELL32.dll ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow

DECLARE INTEGER FindWindow ;
IN WIN32API ;
STRING cNull,STRING cWinName

RETURN ShellExecute(FindWindow(0,_SCREEN.caption),;
"Print","MyExcelFile.xls",;
"",SYS(2023),1)
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform