Xbasic

DDE.REQUEST Function

Syntax

Data_String as C = Request(C Item)

Arguments

Item

Character

Description

The .REQUEST() method obtains an item of information from another application through an open DDE Channel referenced by the pointer. The requested information is returned in Data_String.

Example

This script requests information from a Microsoft Word document which is marked by the CUST_NAME bookmark. This information is used to change the first and last name of the current customer.

dim tbl as P
dim link as P
dim first as C
dim last as C
tbl = table.current()
link = DDE.Open("winword","Letter1")
name = link.request("CUST_NAME")
tbl.change_begin()
first = word(name, 1)
last = word(name, 2)
tbl.first_name = first
tbl.last_name = last
tbl.change_end(.T.)
link.close()

See Also