The DDE triplet is application-dependent and is different for every application
that you
run. For information about an application's DDE triplet, see the application's documentation.
The triplet takes the
following form:
'application-name|topic!item'
where:
application-name
is the executable
filename of the
server application. For example, the
application-name for
Microsoft Word is
winword
, and for Microsoft
Excel that it is
excel
.
topic
is the topic of conversation (between SAS and the DDE server application). This is
typically the full path filename of the document or spreadsheet with which you want
to share data.
item
is the range of conversation specified between the client and server applications.
In spreadsheet applications, this is usually a range of cells. For
document-based applications (for example, Microsoft Word), the item is something that
defines a location in the document, such as a bookmark.
Valid values for all of these arguments vary depending on the server application.
A software application supporting DDE as a server should list acceptable values for
the triplet information in documentation
supplied with the application.
Note: The server application must
be started before trying to communicate with it using DDE. Also, the
DDE triplet format might differ among different applications and among
different versions of the same application.
For example, in order
to place text into a Microsoft Word document TESTDDE.DOC located at
C:\TEMP with a bookmark named NUMBER, you could use this code:
filename test dde 'winword|"c:\temp\testdde.doc"
!NUMBER' notab;
The application-name
is winword
, the topic is "c:\temp\testdde.doc"
,
and the range is !NUMBER
.
Suppose you want to
use SAS to populate the first four rows and two columns of the Microsoft
Excel spreadsheet named Sales Data stored in
C:\EXCEL\SALES.XLS
.
You would use the following code:
filename test dde 'Excel|c:\excel\
[Sales.xls]Sales Data!R1C1:R4C2'
The application-name
is Excel
, the topic is c:\excel\[Sales.xls]
Sales Data
, and the range is R1C1:R4C2
.
If your server application is able to copy the DDE-triplet to the Windows
clipboard, you can display the DDE-triplet in SAS. To do this, select the information in the
server application and copy it to the Windows Clipboard. Return to SAS and select
SolutionsAccessoriesDDE triplet.