Chapter 8

See Graphic

DDE Conversations






DDE Conversations

DDE Execute is a Windows feature that enhances product integration by allowing applications to instruct each other to perform specific tasks (execute commands). For example, using DDEExecute you can create macros in Corel WordPerfect that send commands to control other Windows applications. In order for this to work, the other application must accept DDE Execute strings. See PerfectScript DDEInitiate, DDEExecute, and DDETerminate commands. Also, see the documentation for the other Windows application. The information you need includes the service (application) name, topic name, and list of commands it will accept through DDE Execute.

Corel WordPerfect can act as a server for DDEExecute commands. Corel Quattro Pro can act as a server for DDERequest commands.

In addition, Windows applications can use DDEExecute to control Corel Presentations. The application must first initiate a DDE conversation using the service (application) name of "WPPresentations" and topic name of "Command". Before terminating the conversation, the application can send DDE Execute strings made up of one or more Corel Presentations macro commands. Note that Corel Presentations will accept only product commands, not programming commands. These product commands may not contain variables or expressions.

Windows applications can also send commands to Corel Presentations as a DDE Request item in order to receive a string representing the command's return value. The application must send the DDE Execute string or DDE Request item in ANSI text format. Corel Presentations will return the DDE Request result as an ANSI text string. If either a DDE Execute string or a DDE Request item returns an error, the application can send a DDE Request on the item "LastCmdError" to find out what went wrong. This item will return an ANSI text string containing a three-digit error code and a description of the error. See PerfectScript DDERequest command.


Service and Topic Names

The following list details all the supported DDE Service and Topic names for Corel WordPerfect 8 Suite applications. All of the standard applications in the Corel WordPerfect 8 Suite are DDE Servers. Additionally, Corel WordPerfect, Corel Presentations, and Corel Quattro Pro provide DDE Client support through the PerfectScript macro language.


Envoy and Corel InfoCentral

Envoy and Corel InfoCentral act as servers for DDEExecute, but not clients. This means that you can use DDEExecute in products to send commands to Envoy and Corel InfoCentral, but you cannot use DDEExecute in Envoy or Corel InfoCentral to send commands to other products. For information about the DDE commands you can use with Envoy and Corel InfoCentral, see the Software Development Kits that are available for these products.