Starting Excel from within Progress

vinay_sh

New Member
<div align=""><font size="2" face="Arial" color="#000000"> Taken from the Progress manuals -
---------------------------------------------
PROCEDURE WinExec EXTERNAL "kernel32.dll":
DEFINE INPUT PARAMETER prog_name AS CHARACTER.
DEFINE INPUT PARAMETER visual_style AS SHORT.
END PROCEDURE. /* WinExec */

RUN WinExec (INPUT "Excel /e", INPUT 1) NO-ERROR. /* 1=normal, 2=minimized */
---------------------------------------------

This doesn't work, the Excel application does not start. Any ideas why?

Thanks in advance for any suggestions.</font></div>
 

Wilbert

New Member
<div align="Left"><font size="2" face="Arial" color="#000000"> Hi,

I never tried that method.

Another way to start Excel from within Progress is given in an example-source delivered with Progress.

See %DLC%\src\samples\activex\excelgraphs\oleauto.p.

Hope this helps.

Wilbert.
</font></div>
 

vinay_sh

New Member
<div align=""><font size="2" face="Arial" color="#000000"> Worked great with the COM Object impl of Excel. Thanks Wilbert!</font></div>
 

Chris Kelleher

Administrator
Staff member
<div align="Left"><font size="2" face="Arial" color="#000000"> I think Wilbert's way is probably the best... starting Excel as a COM Object is the easiest way.

If you do need to start other applications using API calls, you really should use ShellExecute, instead of using WinExec. There is more information on ShellExecute and many other API calls available at http://www.global-shared.com/

Hope this helps,
-Chris</font></div>

------------------
Chris Schreiber
ProgressTalk.com Manager
chris@fast4gl.com
 
Top