The purpose of my question arised from my need to send fax with the fax software that comes with Win 2000/NT.
In another question, somebody answered how to send fax within VFP. The example was for faxing MS-WORD document. So, I want a VFP report to fax.
In the following example you can send a VFP report to fax after converting the REPORT FORM into a .TIF document. In my program works fine.
--------------------
* I have an open table with the data I need to send
LOCAL oErr, loFaxServer, loFaxDocument
LOCAL loDir, lnI, lnRecip, lnRecipCnt
lcFaxNum="6876536"
lcTmpDoc = "faxdoc.TIF"
lnRecipCnt = "Atencion: General Manager"
loFaxServer=CREATEOBJECT('faxserver.faxserver')
loFaxServer.CONNECT( '\\'+ALLTRIM(LEFT(SYS(0),AT('#',SYS(0))-1) ) )
STORE RECNO() TO nRecno
REPORT FORM MyReport FOR RECNO()=nRecno TO faxdoc.TIF
GO nRecno
* THIS.CurrentAction = 'Creating Fax Document (fmi)'
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
loFaxServer.Disconnect
RELEASE loFaxDocument, loFaxServer
* --------------- END --------------------
For me works fine. This was done with Windows 2000 NT operating system. My next step is to do the same with
Windows 98 or 95 with the Microsoft Fax.
If you have any idea how to do it, I expect the answer.
Victor F. Rodriguez
Santo Domingo, Dominican Republic