# ddeexec

## Purpose

Send execution string to DDE server application.

## Syntax

    rc = ddeexec(channel,command,item,timeout)

## Arguments

`rc`
  The return code: 0 indicates the function call failed, 1 indicates it succeeded.
`channel`
  The channel assigned to the conversation, returned by `ddeinit`.
`command`
  A string that specifies the command to be executed.
`item`
  (optional) A string that specifies the DDE item name for execution. This argument is not used for many applications. If your application requires this argument, it provides additional information for `command`. Consult your server documentation for more information.
`timeout`
  (optional) A scalar that specifies the time-out limit for this operation. `timeout` is specified in milliseconds (1000 milliseconds = 1 second). The default value of `timeout` is three seconds.

## Description

`ddeexec` sends a string for execution to another application via an established DDE conversation. Specify the string as the `command` argument.

## Example

    % Given the channel assigned to a conversation,
    % send a command to Excel
    rc = ddeexec(channel, '[formula.goto("r1c1")]');

## See Also

    ddeinit, ddepoke, ddereq, ddeterm, ddeunadv, ddeadv

(c) Copyright 1994 by The MathWorks, Inc.