Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to send fax using WinFax thru VFP
Message
 
À
07/08/2002 04:00:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00686912
Message ID:
00686964
Vues:
44
You can use OLE automation, but this depends on the version of Winfax you're using.
I know that DDE will work with any version of Winfax. Here is a sample of how your code should look when using DDE with WinFax:
*** First, in the Load or Init code of your form, enter the following
set printer to name "WinFax"
DDESETOPTION("TIMEOUT",30000)
DDESETOPTION("SAFETY",.F.)

****** then whenever you want to send a fax, use something like this 
local FaxChan, RetVar, lcRecipient, tmpFaxNo, tmpSubj

FaxChan = DDEInitiate("FAXMNG32","CONTROL")
retvar = DDEExecute(FaxChan,"GoIdle")
FaxChan = DDEInitiate("FAXMNG32","TRANSMIT")
if FaxChan >= 0
   *** Fax channel opened successfully!
   tmpFaxNo = "7951011" &&& fax number
   tmpSubj = "Sending Faxes with Winfax"
   lcRecipient = 'recipient("' + ;
              tmpFaxNo + ;
              '","","","' + ;
              "From Variable or string" + ;
              '","' + ;
              "Recipient Name" + ;
              '","' + ;
              rtrim("Subject: "+tmpSubj) + ;
              '"," "," ")'
   retvar = DDEPOKE(FaxChan,"SendFAX",(lcrecipient))
   retvar = DDEPoke(FaxChan,"Sendfax",'resolution("HIGH")')
	
   report form YourReport to printer noconsole

   retvar=DDEExecute(FaxChan,"GoActive")
   retvar=DDETerminate(FaxChan)
		
   tmpHold = inkey( 20 ) && wait for a while, you can use less
endif
Cheers,
Jaime


>All,
>
>I believe I have come across documentation that deals with sending VFP REPORTS AS FAXES using WinFax via VFP but just cant seem to find it.
>
>I tried looking at each page of the UT FAQ but to no avail.
>
>HELP!
>
>TIA
>Dennis
Why do programs stop working correctly as soon as you leave the Fox?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform