/* this is basic sample code only */
DEFINE VARIABLE chWord AS COM-HANDLE NO-UNDO.
CREATE "word.application" chWord NO-ERROR.
chWord:Documents:ADD("C:\test\test.dotx").
/* add data to the file here and save it as a document. */
chWord:QUIT.
RELEASE OBJECT chWord.