Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Faxes from VFP

Status
Not open for further replies.

eogvot

Programmer
Mar 11, 2009
9
US
I am looking for a solution that will allow me to automatically send a VFP report to a fax server, along with the recipient informaation. My customer wants a 'totally' automated process so that they do not have to manually recipient name/fax# into the fax software.

A product called SnappyFax uses something called WM_COPYDATA, but I've never heard of this and am having a hard time figuring out how to implement it in VFP.

Suggestions for using SnappyFax or another fax server would be appreciated. We program in VFP 7

 
You should be able to use VFP to automate the sending of FAX's through the use of any FAX software which supports ActiveX/API calls.

The real issue will be the "FAX Server"

There are expensive FAX Server packages (HW + SW) out there, but it does not sound like you are looking at those for budgetary reasons.

Most FAX software does not operate in a Server mode. Instead it works at the workstation level - not a centralized server level.

WinFax is an example of this. It can be automated by VFP, but installs to the workstation and does not work as a centralized FAX server.

The older Windows OS: Small Business Server had a free FAX server which worked pretty well to send FAX's out through Outlook. But most people have eliminated the use of Windows SBS by now.

Perhaps someone else is familiar with alternative software packages.

Good Luck,
JRB-Bldr
 
I've implemnted GFI FaxMaker software for a client that faxes out about 300 faxes, one day per week (invoices).
Depending upon your volume, you'll want to add a 2+ line fax card such as Brook Trout. (The Faxmaker site has info about compatible hardware).

It's not trivial to set it up and requires a bit of periodic attention (deleting log files if you have lots of activity), but it has been very reliable.



Bill Chambers
Chambers & Associates
 
I have done a solution for a client faxing whole day and serializing numbers on faxes and archiving them in VFP 8.0

I rewrote it 2 years ago to fax and email, now i dropped the stupid fax. Thing includes a KANBAN system even calculating how many stock items to order. Then sit back and have coffee and a donut.

Below an old commented example with comments, it is a TAPI call.

*Close All
Public V1, V2
Set Safety Off
x=Createobject('faxserver.faxserver')
lcMachine = "\\"+Getwordnum(Sys(0),1) && somewhat simpler code; wOOdy
x.Connect( lcMachine )
fj = x.getjobs()
*?fj.Count && Prints "0"
fj=.F.
* Show the fax drivers loaded on this machine:
fp = x.getports()
*?fp.Count
*WAIT message fp.Item(1).Name WINDOW AT 10,20
*?fp.Item(1).canmodify
*?fp.Item(1).rings
*?fp.Item(1).Send
*?fp.Item(1).tsid
*?fp.Item(1).csid
*?fp.Count
Select b
Go Bottom
Store serialnr To V2
Go Top
Store serialnr To V1
Do While .Not. Eof()
* Create a fax document
FD = x.createdocument("filename")
FD.faxnumber = ALLTRIM(faxnr)
FD.displayname = 'KANBAN Fax '+Alltrim(Str(V1))+'-'+Alltrim(Str(V2))
* Before running this program, create a word document
* called SampleFax.doc... The TAPI interface will automatically
* invoke the registered shell "Print" command on it.
Store Recno() To tel
Store "kanban"+Alltrim(Str(V1))+'-'+Alltrim(Str(V2))+".txt" To noemer
Report Form kanban Noconsole To File &noemer
*For Recno()=tel
FD.filename = Fullpath(noemer)
FD.sendcoverpage = .F.
* Send it Off!
* (you should see Foxpro report running briefly and print the document,
* then the Microsoft Fax icon should show up in the system tray
* and try to send the fax!)
FD.Send
*clean up (probably should wait a bit before this)
Inkey(1)
*FD = .F.
*x = .F.
*Do While .Not. Eof()
*Go tel
*Skip
*Enddo
Enddo
Set Safety Off
Public faxstr, faxstr2, sernr, sernr2, nr, old, v4, oudnaam, nieuwnaam
Store '"'+Sys(5)+Sys(2003)+'"' To huid
*STORE sys(5)+SYS(2003)+'\' TO tr
Store "c:\kanban\*.*" To faxstr
Store '"c:\kanban"' To faxstr2
*Use faxes2 exclusive
Select c
Do While .T.
Adir(fa,faxstr)
Zap
Append From Array fa
Replace All filename With Lower(filenaam)
REPLACE ALL tijd2 WITH CTOT(DTOC(datum)+' '+tijd)
INDEX ON tijd2 TO faxes2
Go Bottom
*line below to check for validated renaming
WAIT "Laatst verzonden fax= "+filename WINDOW AT 10,20 TIMEOUT 1
Store '"c:\kanban\'+Alltrim(filename)+'"' To old
If Left(filename,5)='faxnr' .Or. Lower(Left(filenaam,5))='start'
LOOP
ELSE
If Left(filename,5)<>'faxnr' .Or. Lower(Left(filenaam,5))<>'start'
Store 'faxnr'+Alltrim(Str(V1))+'-'+Alltrim(Str(V2))+'.tif' To sernr
Store '"'+'faxnr'+Alltrim(Str(V1))+'-'+Alltrim(Str(V2))+'.tif'+'"' To sernr2
Replace filenaam With sernr
WAIT "Now sent fax= "+filename WINDOW AT 10,20 TIMEOUT 3
exit
Endif
ENDIF
Enddo
Set Default To &faxstr2
Rename &old To &sernr2
Set Default To &huid



 
Keep in mind that "a solution for a client faxing" is not necessarily the same as a FAX Server.

As I said above, a FAX Server is a common, centralized HW/SW combination which can be 'seen' and used by all users on a network.

Client faxing is typically workstation-oriented where each user has to have their own installation of the SW and typically HW as well.

There are many client faxing options available, but few FAX Server choices and those are typically expensive.

You need to decide if you need a true FAX Server and, if so, start budgeting for it. Make certain that it has a workstation-API or other means for workstation-software to directly access it. With that in place the VFP integration will then be relatively easy.

If you find that you do not need a FAX Server, but a workstation-oriented approach would work, then just Google for FAX software.

A 3rd approach you might consider would be the Internet FAX which you can learn about by Googling for FAX internet

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top