CLIPBOARD
Top  Previous  Next

Environment

Syntax: SET ClipBoard <TextString or Variable>

About the SET CLIPBOARD Command

Places the specified string onto the Windows clipboard, where it can be accessed from other programs.

EXAMPLE 01:

SET CLIPBOARD 'Here is text for the clipboard'

EXAMPLE 02:

Assuming you have already created a MS Word Document (TestDoc.DOC) or WordPerfect Document (TestDoc.WPD).

-- ClipBrd.RMD 
CONNect ConComp
SET VAR vAddressBlock TEXT = NULL
SET VAR vCustID INTEGER = 100
SELECT (Company+(CHAR(10))+CustAddress+(CHAR(10)) + 
  +CustCity+','&CustState&CustZip+(CHAR(10))) + 
   INTO vAddressBlock INDIC IvAddressBlock + 
   FROM Customer WHERE CustID = .vCustID 
SET CLIPBOARD .vAddressBlock 
LAUNCH TestDoc.DOC 
  or 
LAUNCH TestDoc.WPD

Once the MS Word or WordPerfect is launched and the document is opened, you could either use Edit > Paste or Ctrl+V to paste the windows clipboard text!

The resulting pasted block of text would look like:

Pc Distribution Inc.
3200 Westminster Way
Boston, MA 02178

Above example could be used in your application command file or in an EEP.