General information
Category:
ActiveX controls in VFP
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only