Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using DDE and Winfax to distribute reports from VF3.0
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00020454
Message ID:
00020531
Vues:
38
>I am trying to fax from an application using DDE. I am using Winfax Pro
>7.5 to fax the reports. The code I am using is on the click method of a
>Fax button :
>
> SCATTER MEMVAR
> ThisREC = RECNO()
>
> SET SAFETY OFF
>
> ** Set connection prompts off
> retvar = DDESetoption("safety",.F.)
>
>
> ** First, set the state to CONTROL
>
> FaxChan = DDEInitiate("c:\delrina\winfax\FAXMNG32","CONTROL")
> IF FaxChan<0
> thiserror = DDELastError()
> =MESSAGEBOX("DDEInitiate Error" ,16,"Incoming Wires")
> ENDIF
>
>
>
> ** Set the modem off-line and Handle connection errors
> retvar = DDEExecute(FaxChan,"GoIdle")
>
> ** Set Winfax back to transmit mode to create the queued event
> FaxChan = DDEInitiate("FAXMNF32","TRANSMIT")
>
> ** Set up the fax attachment
> retvar = DDEPoke(FaxChan,"sendfax",
>'attach(C:\projects\wires\incoming.frx")')
>
> ** Set up the destination recipient information
>
> cFaxNum = ALLTRIM(m.fax_number)
> cCompany = ALLTRIM(m.receiving)
> retvar =
>DDEPoke(faxChan,"sendfax",'recipient(&cFaxNum,"","","",&cCompany,;
> "** INCOMING FAX NOTIFICATIO**","","","FAX")')
>
> ** Set the resolution
> retvar = DDEPoke(faxChan,"Sendfax",'resolution("HIGH")')
>
> ** Turn the Modem back on
> retvar = DDEExecute(FaxChan,"GoActive")
>
>
> ** Bypass the send dialog box
> *retvar = DDEPoke(FaxChan,"Sendfax",'showsendscreen("0")')
>
> ** Send the Fax
>
> retvar = DDEPoke(FaxChan,"sendfax","SendFaxUI")
>
> ** Now close the DDE Channel
> retvar = DDETerminate(FaxChan)
>
> =MESSAGEBOX("Wire Transaction FAXED ! ",48, "CUCM Wires Program")
>
>
>I don't even get the connection to WinFax. When I run this code (except
>for the messageboxes) in Foxpro 2.6, it connects to Winfax and sends the
>report. Any ideas on what I am missing here?

Hi Allan,
This is what I do:

channum=DDEINITIATE("FAXMNG","TRANSMIT")
recipient='recipient("999-9999")
=DDEPOKE(channum,"Sendfax",recipient)
=DDEPOKE(channum,"Sendfax",'resolution("HIGH")')
=DDEPOKE(channum,"Sendfax",'showsendscreen("0")')
m.fileattach='attach("c:\temp\myDoc")'
=DDEPOKE(channum,"Sendfax",m.fileattach)
=DDEEXECUTE(channum,"SendfaxUI")
=DDETERMINATE(channum)

Try to use this minumun steps first, use just one channel number,
I mean, dont "initiate" twice the connection, one for "control"
and another one for "transmit", go directly to "transmit", that
will help you to isolate the problem.

Hope this help.
Good Luck.

Hey Tina, how are you doing ?
Remember one time that we made a thread about this?, in that
ocassion we spoke about how to make a delrina server, well,
I haven't done it, can you please show me step by step how to
set up a delrina server, I have win fax 4.0, I know you use
Novel, but I'm going to try this in "Banyan Vines" and I think
what you did in Novel might work more or less in Vines.
Thanks.
luisg@netrunner.net
Luis Guzman, MCP
"The only glory most of us have to hope for
is the glory of being normal." Katherine Fulleton Gerould
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform