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

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.

Syntax

DDEExec(sApplication, sCommand)

sApplication:

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

sCommand:

The command that the application will execute.

Return Value

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

Related Functions

DDEPost, DDERead, DDEWrite, DDEhExecute

Example

/* Instruct the Excel application to recalculate its spreadsheet 
immediately. */
DDEExec("Excel","[Calculate.Now()]");

See Also

DDE Functions