Xbasic
DDE.POKE Function
Syntax
V Poke(C Item,C Data[,N clipboard_format])
Arguments
- Item
The name of a data item the application recognizes.
- Data
Contains the information to be sent to the application.
- clipboard_format
Numeric
Description
The .POKE() method supplies data to another application by passing it through an open DDE channel referenced by the object pointer, .
Example
This script is attached to a button on a form for the customer table. It places information from the current customer record into a Microsoft Word document that contains three bookmarks: NAME, ADDRESS, and CITYZIP.
dim tbl as P dim link as P dim fullname as C dim addr as C dim cityzip as C tbl = table.current()'get a reference to the customer table link = DDE.open("winword", "Letter1") fullname = trim(tbl.FIRST_name) + " " + tbl.last_name link.poke("NAME", fullname) if .NOT. tbl.address_2.IS_blank() addr = tbl.address_1-chr(13) + chr(10) + tbl.address_2 else addr = tbl.address_1 end if link.poke("ADDRESS", addr) cityzip = tbl.city-", " + tbl.state_prov-" " + tbl.ZIP link.poke("CITYZIP", cityzip) link.close()
See Also