DEFINE VAR wordfile AS CHAR INIT "filename".
DEFINE VAR hWordApp AS COM-HANDLE. FIND FIRST customer. /*Create a temporary file to hold the Word Document */ wordFile = SESSION:TEMP-DIRECTORY + "\" + customer.NAME + ".doc". /* Copy the image from the blob field to the * temporary file with COPY-LOB code */ COPY-LOB customer.Report TO FILE wordFile. /* Display the Word Document */ CREATE "Word.Application" hWordApp. hWordApp:VISIBLE = TRUE. hWordApp:documents:OPEN(wordFile). |