Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fax using VFP
Message
De
28/10/1999 09:44:28
Daiv Stoner
Inconceivable Software, Llc
Jeffersonville, Indiana, États-Unis
 
 
À
27/10/1999 16:55:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00282677
Message ID:
00282999
Vues:
19
If you aren't intent on using winfax, you can do it with Outlook/MAPI. I have a scheduled program that periodically checks a table for faxes that need to be sent and sends them. It's based on the following code. I lifted most of this from somewhere, can't remember where.

There is no confirmation, but I have Outlook set to try 3 times. If it doesn't go through, I get an "undeliverable" message in the inbox. I guess you could check for that to determine if a resend is necessary.

oMapi=createobject("MAPI.Session")
oMapi.logon("Microsoft Outlook Internet Settings")
*!* Call the add function of the outbox messaging to create a container for the msg
oMsg=oMapi.outbox.messages.add
*!* Change the subject property of the message object
oMsg.subject="test fax subject"
*!* Change the text property of the message object
oMsg.text="Test Fax"
*!* Add the attachment file
oMsg.attachments.add("order.htm",1,1,"c:\temp\order.htm")
*!* Call the add method of the recipients object
oRecip=oMsg.recipients.add
*!* Change the address property of the recipients object
oRecip.name="Fax Recipient Name"
oRecip.address = "FAX:anybody home@18005551212"
*!* Call the resolve method of the recipients object
oRecip.resolve
*!* Call the send method
oMsg.send(.F.,.F.) && don't save a copy, don't show the dialog
*!* Logoff
oMapi.logoff
Indecision is the key to flexibility.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform