Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: DYMO DDE expample 2004-06-24 -- Jolda Ron Here is some DDE code that I am using and that DOES work.
Variables:
server (long) ! dde channel ID
l:DDECannel ! Ulong
l:DDELabelFile ! String(40)
l:line 1 - 7 are Cstring(80)
____________
l:DDECannel = DDECLIENT('DYMO','System')
!---------------------------------------------------------------------------
-------------
! open label file
!---------------------------------------------------------------------------
-------------
l:DDELabelFile = 'ARX.LWT'
DDEEXECUTE(l:DDECannel,'Open(' + l:DDELabelFile + ')')
DDEEXECUTE(l:DDECannel,'MiniTool')
DDEEXECUTE(l:DDECannel,'Hide')
!---------------------------------------------------------------------------
-------------
! send values to printer
!---------------------------------------------------------------------------
-------------
! DDEEXECUTE(l:DDECannel,'SetObjectText(Address,This is line 1|this is
line2|thisis line 3)')
l:line1 = clip(P:PTNAME) & ' DOB: ' & P:PTDOB & ' -- Date: ' &
format(tor:tdate,@d2)
l:line2 = clip(P:RX) & ' -- SUBSTITUTE: ' & P:SUBSTITUE
l:line3 = 'Disp: ' & clip( P:disp)
l:line4 = 'Sig: ' & P:sig
l:line41 = 'REFILLS: ' & CLIP(P:REFILLS) & ' - - LABEL: ' &
P:LABEL
l:line5 = 'RXDate: ' & P:RXDATE & ' Dr. ' & P:RXdoctor
l:line6 = 'RX-ID: ' & clip(P:RXIHID) & ' - - OrderIH_ID: ' &
P:TORIHID
l:line7 = l:line1 & '|' & l:line2 & '|' & l:line3 & '|' & l:line4 &
'|'& l:line41 & '|' & l:line5 & '|' & l:line6
DDEEXECUTE(l:DDECannel,'SetObjectText(Address, '& l:line7& ')')
!@ DDEEXECUTE(l:DDECannel,'Restore')
DDEEXECUTE(l:DDECannel,'Print')
DDEEXECUTE(l:DDECannel,'Print')
! ...
DDEEXECUTE(l:DDECannel,'Show')
DDEREAD(l:DDECannel,DDE:Remove,'System')
DDEClose(l:DDECannel)
Today is November 21, 2024, 8:24 am This article has been viewed 35228 times.
|
|