Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
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
Today is November 21, 2024, 8:32 am This article has been viewed 35225 times.
|
|