`
Par2: MS Word from Clarion with DDE 2000-03-16 -- Oddmar Dam MS Word with DDE How to use MS Word in Clarion, using DDE ! Include DDE.CLW Inside the Local MAP ! FileName = CSTRING(128) ! Channel = LONG FileName = 'test.DOC' RUN('winword /a',0) IF RUNCODE() <> 0 MESSAGE(ERROR() & ' Error Code ' & RunCode()) . DISPLAY() Channel = DDECLIENT('WinWord') LOOP UNTIL Channel <> 0 Channel = DDECLIENT('WinWord') X# += 1 IF X# = 100 ! Timeout MESSAGE('Word did not start') BREAK . . IF Channel <> 0 IF EXISTS(FileName) DDEEXECUTE(Channel,'[FileOpen("' & FileName & '")]') ELSE DDEEXECUTE(Channel,'[FileSaveAs "' & FileName & '"]') . . DISPLAY Printed November 21, 2024, 12:58 pm This article has been viewed/printed 35225 times. |