Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Looking for fax software to call from VFP? freeware, may
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01331661
Message ID:
01331893
Views:
22
Hi Peter,

>I was just asked to send out fxes from within VFP

Windows has a built-in fax program with some limitations, though. You can only send faxes from the local machine and you need a modem or a simulated modem connected to that machine in order to send faxes. You also need a file extension registered with your application, because the fax server tries to call the application in order to print the document. Alternatively, you can create a TIFF file, but it must be some very specific format. To send a fax, you would use code like this:
*--------------------------------------------------------
* 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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform