Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Send FAX
Message
 
À
08/09/2009 09:43:00
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01423055
Message ID:
01423102
Vues:
149
>Has anyone worked on this type of program?

If Windows Fax is configured correctly, you can use the following code to send a fax:
*--------------------------------------------------------
* We send the fax from this machine
*--------------------------------------------------------
Local loFaxServer
loFaxServer = CreateObject("FAXCOMEX.FaxServer")
loFaxServer.Connect( "" )

*--------------------------------------------------------
* Create a fax new document and attach a Word document
*--------------------------------------------------------
Local loFaxDocument
loFaxDocument = CreateObject("FAXCOMEX.FaxDocument")
loFaxDocument.Body = FullPath("MyFax.doc")
loFaxDocument.DocumentName = "Special offer"
loFaxDocument.Priority = 2 && fptHIGH
loFaxDocument.ReceiptType = 0 && frtNONE
loFaxDocument.ScheduleType = 0 && fstNOW

*--------------------------------------------------------
* Specify information for the cover page
*--------------------------------------------------------
loFaxDocument.CoverPageType = 2 && fcptSERVER
loFaxDocument.CoverPage = "generic"
loFaxDocument.Note = "Text on the cover page"
loFaxDocument.Subject = "Hello World fax"

*--------------------------------------------------------
* Add a recipient
*--------------------------------------------------------
loFaxDocument.Recipients.Add( "68267082", "Christof" )

*--------------------------------------------------------
* Specify the sender. Use the default sender here.
*--------------------------------------------------------
loFaxDocument.Sender.LoadDefaultSender()

*--------------------------------------------------------
* Submit the document to the fax server
*--------------------------------------------------------
Local lcJobID
lcJobID = loFaxDocument.ConnectedSubmit(loFaxServer)
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform