Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automation with Windows Fax
Message
From
24/04/2006 23:37:57
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
 
 
To
24/04/2006 22:27:31
Aaron K. Y. Chu
Health & Care Co. Ltd.
Hong Kong, Hong Kong
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
01116168
Message ID:
01116175
Views:
20
The closest method I can locate in VFP Wiki is as followed:
However, it also means that it cannot directly print the report to Fax machine, in that it should

1. export to any *.tiff, which reportlistener can do it
2. send fax via the following example

I wonder is there any simpler steps than that?
x=createobject('faxserver.faxserver')
*lcNetInfo = SYS(0)
*lcMachine ='\\'+alltrim( Left( lcNetInfo, AT('#', lcNetInfo )-1 ) )
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
?fp.item(1).name
?fp.item(1).canmodify
?fp.item(1).rings
?fp.item(1).send
?fp.item(1).tsid
?fp.item(1).csid

* Create a fax document
FD = x.createdocument("filename")
fd.faxnumber = '687-9870'
fd.displayname = 'VFP Fax Message'
* Before running this program, create a word document
* called SampleFax.doc... The TAPI interface will automatically
* invoke the registered shell "Print" command on it.
fd.filename = fullpath("samplefax.doc")
fd.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!)
fd.Send

*clean up (probably should wait a bit before this)
inkey(1)
fd = .f.
x = .f.
Best regards,

Aaron Chu

********************************************************

Working with Visual FoxPro is a lot of FUN!

********************************************************
Previous
Reply
Map
View

Click here to load this message in the networking platform