Cicode Programming Reference > Cicode Function Categories > Dynamic Data Exchange Functions Introduction > DDEExec


Executes a command in an external Windows application running on the same computer. With this function, you can control other applications that support DDE. Refer to the documentation provided with the external Windows application to determine if DDE is supported and what functions can be called.

You cannot use DDEExec() to call macros on a remote computer or to call Access SQLs. For these calls, Network DDE needs to pass the sDocument argument, so you need to use the DDEh... functions, passing sDocument in the DDEhInitiate() function.


DDEExec(sApplication, sCommand)


Application name (.EXE filename), for example, "WinWord".


The command that the application will execute.

Return Value

1 (one) if successful, otherwise an error is returned.

Related Functions

DDEPost, DDERead, DDEWrite, DDEhExecute


/* Instruct the Excel application to recalculate its spreadsheet 
immediately. */

See Also

DDE Functions