Salesforce

DDEGet (Magic xpa 3.x)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

DDEGet (Magic xpa 3.x)

Gets a string of characters from a DDE server

DDEGet returns a string value of size len from the specified DDE server. Each DDE server application provides access to its services via a combination of the three identifiers: service, topic, and item. Taken together, the three identifiers provide a unique identification of the service.

Syntax:

DDEGet(service, topic, item, len)

Parameters:

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

topic. The area within the server application with which you want to exchange information. A topic may be a document name in MS Word for Windows or a spreadsheet in MS Excel. Server applications usually provide a system topic as standard practice. The system topic provides information about the application and topics that may be accessed by DDE. The system topic services can be requested through the item parameter. For example, the MS Excel system topic has a system item that returns the items that are available in the system topic. The format of the information returned by the system topic depends on the server application.

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 read by DDE if the topic specifies the document name, and the item points to a bookmark in that document that marks the required paragraph.

len. The maximum length of the information that will be returned by the function. If the information returned is less than the maximum length, its trailer will be padded with blanks.

Returns:

A character string of size len. If the DDEGet failed, the string will be empty. The string returned is provided by the DDE server application according to the service, topic, and item parameters of the function.

Examples:

DDEGet('WinWord', 'c:\docs\ddetest.doc', 'toMagic',2000) reads a paragraph from an MS Word for Windows document that is marked with a bookmark in Word where 'c:\docs\ddetest.doc' is the document name; 'toMagic' is the bookmark name, and2000 is the maximum size in bytes of the paragraph that will be returned by the function.

DDEGet('Excel','c:\docs\budget.xls','R19C1:R22C7', 2000)reads a range of cells from an MS Excel spreadsheet where: 'c:\docs\budget.doc' is the spreadsheet name, 'R19C1:R22C7' is the cell range, and 2000 is the maximum size in bytes that will be returned by the function.

Magic xpa requires the single quotes shown in these examples to identify variables as strings.

See also:

DDEBegin, DDEEnd, DDEPoke, DDERR,DDExec

Reference
Attachment 
Attachment