INITIATE macro

Opens a dynamic data exchange (DDE) channel to an application and returns the number of the open channel. Once you have opened a channel to another application with INITIATE, you can use EXECUTE and SEND.KEYS to control the other application from a Microsoft Excel macro. (SEND.KEYS is available only with Microsoft Excel for Windows.) If INITIATE is successful, it returns the number of the open channel. All the subsequent DDE macro functions use this number to specify the channel. If INITIATE is unsuccessful, FALSE is returned.

Important   Microsoft Excel for the Macintosh requires system software version 7.0 or later for this function.

Syntax

INITIATE(app_text, topic_text)

App_text    is the DDE name of the application with which you want to begin a DDE session, in text form. The form of app_text depends on the application you are accessing. The DDE name of Microsoft Excel, for example, is "Excel".

Topic_text    describes something, such as a document or a record in a database, in the application that you are accessing; the form of topic_text depends on the application you are accessing. Microsoft Excel accepts the names of the current documents as topic_text, as well as the name "System".

Remarks

 

Example

The following macro formula opens a channel to the document named MEMO in the application named WORD:

INITIATE("WORD", "MEMO")

Related Functions

POKE   Sends data to another application

REQUEST   Returns data from another application

TERMINATE   Closes a channel to another application

EXECUTE   Carries out a command in another application

EXEC   Starts a separate program

Return to index