Salesforce

DDEPoke (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

DDEPoke (Magic xpa 3.x)

Provides the identifier of the DDE service.

DDEPoke transfers a string from Magic xpa to the DDE server specified by the function's parameters. Each DDE server application provides access to its services via a combination of three identifiers: service, topic, and item. Taken together, the three identifiers provide a unique identification of the service. The string transferred by Magic xpa will be inserted to the server application at the location identified by service, topic, and item.

Syntax:

DDEPoke(service, topic, item, data)

Parameters:

service: Provides the main identifier of the DDE service. Usually this is an application name such as WinWord for Microsoft Word for Windows, or Excel for Microsoft Excel.

topic: Provides a definition of the area within the server application with which you wish to exchange information. A topic may be a document name in Microsoft Word for Windows or a spreadsheet in Microsoft Excel.

item: Further defines the exact data item for the exchange. Together with service and topic it points to a unique item. For example, a paragraph in a Word for Windows document may be inserted by DDE if the topic specifies the document name, and the item points to an empty bookmark in that document that marks the required paragraph.

data: The data string that will be passed by the function to the server application.

Returns:

TRUE for successful completion, or

FALSE for failure to poke the data to the server application.

Examples:

DDEPoke ('WinWord', 'c:\docs\ddetest.doc', 'fromMagic', 'This paragraph was planted by Magic xpa using DDE')
will write a paragraph to an MS Word for Windows document, where the paragraph has been marked with a bookmark in Word, and where 'c:\docs\ddetest.doc' is the document name, 'fromMagic' is the bookmark name, and 'This paragraph was planted by Magic xpa using DDE' is the data that will be transferred by the function to the server application.

DDEPoke ('Excel', 'c:\docs\budget.xls', 'R1C1', '100')
Will write the number 100 into an MS Excel spreadsheet cell, where: 'c:\docs\budget.doc' is the spreadsheet name, and 'R1C1' is the first cell of the spreadsheet that will receive the information passed by the function.

Magic xpa requires the single quotes shown in this example, to identify variables as strings.

See also:

DDEBegin, DDEEnd, DDEGet, DDERR, DDExec

Note:

The information transferred to the server application may have to follow some formatting rules dictated by the server application. Refer to the server application documentation for details.

Reference
Attachment 
Attachment