` Printed Icetips Article

Icetips Article



Par2: Interfacing to WinFax Pro using DDE
1999-07-07 -- Richard Rose
 
Obviously you need to include prnprop.clw to specify Winfax as the default printer.


Variables required.

Channel Long
FaxExpression    (C)String 150

Somewhere like a Splash screen:

channel = DDEclient('FAXMNG32','CONTROL')

Button calling the Single report from a browse:

Faxexpression = 'recipient('& chr(34) & COM:Fax & chr(34) & ',,,' & chr(34)
& COM:Contact & |
    chr(34) &',' & chr(34) & COM:CompanyName & chr(34) & ',' & chr(34)&
'Auto-Fax Copy Invoice ' & chr(34) & ',,,)'

On the report in question (for single reports):
Progressmanager.Init Priority 5001

channel = DDEclient('FAXMNG32','TRANSMIT')
DDEpoke(channel,'sendfax',Faxexpression)


For multiple reports to multiple destinations.

Call a process which calls the report (conditions optional ie filters etc.)
In the Report make the field(s) you use in your faxexpression hotfields in the case below
MAC:MeterFaxNo & MAC:CompanyName.

Report
Thiswindow.Init priority 5001


channel = DDEclient('FAXMNG32','TRANSMIT')
FaxExpression = 'recipient('& chr(34) & MAC:MeterFaxNo & chr(34) &
',"18:30:00",,,' & chr(34) & LEFT(MAC:CompanyName,40) & chr(34) & ',' &
chr(34)& 'Auto-Meter Reading Request' & chr(34) & ',,,)'

DDEPOKE(channel,'sendfax',Faxexpression)

(same) Report
WindowEvents.CloseWindow Priority 5000

DDEExecute(channel,'GoActive')



Printed November 23, 2024, 3:36 am
This article has been viewed/printed 35202 times.