Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending Fax using VFP6.0
Message
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00535467
Message ID:
00535484
Views:
19
Take a look at this (all error trapping removed for brevity; This requires Microsoft Fax be installed):

loFaxServer=createobject('faxserver.faxserver')
loFaxServer.connect( '\\'+alltrim(LEFT(SYS(0),at('#',SYS(0))-1) ) )
WordApp = CreateObject('word.application')
lcTmpDoc = FullPath( JustStem(UnqTmp())+'.DOC' )
=StrToFile( THIS.oMsg.Bodies.Items['FAX'].MsgBody, lcTmpDoc )
WordApp.Documents.Open( lcTmpDoc, .f., .f., .F. ) && (fname, ConfirmConvert, R/O, RecentFiles)
* Do whatever to fill the word doc with what you want...
* You could just print a VFP report to the fax here, instead.
* Create a fax document
loFaxDocument = loFaxServer.createdocument(lcTmpDoc)
loFaxDocument.faxnumber = lcFaxNum
loFaxDocument.displayname = THIS.oMsg.Desc
loFaxDocument.filename = lcTmpDoc
loFaxDocument.sendcoverpage = .f.

* Send it Off!
* (you should see Word open briefly and print the document,
* then the Microsoft Fax icon should show up in the system tray
* and try to send the fax!)
loFaxDocument.Send
WordApp.quit
loFaxServer.Disconnect
RELEASE loFaxDocument, loFaxServer
Set Default to (loDir)



>Hi,
>
>Program requirement : Send Fax using VFP6.0.
>A table has fields with necessary information like Fax number, document to fax.
>How do I go about this?
>Help appreciated.
>Thank you.
>
>Neetu Kumar
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform