![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Here is a sample of using WinFax Pro 9.02 automation server with Paradox 7.0/32: ;---------------- var oaSend OleAuto iFaxErr LongInt endVar if oaSend.open("WinFax.SDKSend") then oaSend.LeaveRunning() oaSend.ShowSendScreen(0) ; don't show the send screen oaSend.SetPreviewFax(0) ; don't preview fax oaSend.SetHold(0) ; send fax immediately ; or: ; oaSend.SetHold(1) ; hold the fax & send later ; set cover page oaSend.SetQuickCover(1) ; use quick cover page ; or, to use your own cover page: ; oaSend.SetQuickCover(0) ; oaSend.SetCoverFile("Full path to cover page fax file") oaSend.SetSubject("Subject for the fax") oaSend.SetCoverText("Cover page text") oaSend.SetUseCover(1) ; or, to not send a cover page: ; oaSend.SetUseCover(0) ; repeat the following statements for each recipient oaSend.SetTo("Mr. Recipient") oaSend.SetCompany("Company Name") ; oaSend.SetCountryCode("") ; for foreign phone# oaSend.SetAreaCode("212") oaSend.setNumber("555-1212") oaSend.AddRecipient() ; end of recipient statements oaSend.AddAttachmentFile("") ; don't create attachment oaSend.SetPrintFromApp(1) ; fax will be sent to WinFax printer driver oaSend.Send(0) ; wait until WinFax is ready sleep() ; let other windows processes run while oaSend.IsReadyToPrint() = 0 sleep() endWhile ;; now print the report to WinFax printer driver ;; can use Paradox report, Crystal Reports or whatever ; wait for WinFax to finish printing while oaSend.IsReadyToPrint() = 0 sleep() endWhile ; check for faxing error if oaSend.IsError() = 1 then iFaxErr = oaSend.GetLastError() msgStop("Error","WinFax Send Error: " + strVal(iFaxErr)) endif oaSend.Done() oaSend.close() ; close the automation object for each fax job endif ;---------------- -- |
|
Before I dive into the next project I need to know if this is possible: I have written some software which creates a letter to a referring physician about a patient admitted to the hospital. It prints a fax cover sheet and the appropriate letter. It works very well and the 2 pages are printed as 2 jobs and then faxed by an administrative support person. The program is being used so much that the administrative support person is getting behind. They have asked me if can I make it print to WinFax Pro (or some other fax software). 2 questions: 1) Is that possible and how automatic is it for the user? a) Can I get Paradox to give the fax software the phone # so they don't have to punch it into the machine? 2) Can I get the cover sheet and the letter (2 separate reports) to fax at the same time? (Most of these physicans do not recieve business e-mail at this time to be able to do this electronically). Thanks and I hope all of you (to whom it applies) had a Merry Christmas and everyone has a happy, healthy, prosporous and safe New Year! Craig |
#3
| |||
| |||
|
|
Before I dive into the next project I need to know if this is possible: I have written some software which creates a letter to a referring physician about a patient admitted to the hospital. It prints a fax cover sheet and the appropriate letter. It works very well and the 2 pages are printed as 2 jobs and then faxed by an administrative support person. The program is being used so much that the administrative support person is getting behind. They have asked me if can I make it print to WinFax Pro (or some other fax software). 2 questions: 1) Is that possible and how automatic is it for the user? a) Can I get Paradox to give the fax software the phone # so they don't have to punch it into the machine? 2) Can I get the cover sheet and the letter (2 separate reports) to fax at the same time? (Most of these physicans do not recieve business e-mail at this time to be able to do this electronically). Thanks and I hope all of you (to whom it applies) had a Merry Christmas and everyone has a happy, healthy, prosporous and safe New Year! Craig |
#4
| |||
| |||
|
|
They have asked me if can I make it print to WinFax Pro (or some other fax software). |
|
2 questions: 1) Is that possible and how automatic is it for the user? a) Can I get Paradox to give the fax software the phone # so they don't have to punch it into the machine? |
|
2) Can I get the cover sheet and the letter (2 separate reports) to fax at the same time? |
#5
| |||
| |||
|
|
What's more, no oleauto required. Just use Paradox to generate a simple command string either in a text file or imbedded in the document, and ActFax will do as requested. We prefer the text file approach for 100% reliability. |
#6
| |||
| |||
|
|
I dont find clear, can you give an example of some code which does not require to fill manually a fax number, please? |
#7
| |||
| |||
|
|
SWITCH CASE ptrname="activefax" : intSetResolution= 2 intPrintFromApp = 1 intSetUseCover = 0 intSetHold = 1 intSetPriority = 25 STsetHold = strval(intSetHold) faxSubject = xxSubject+" / ["+mylib.getuserid()+"]" faxTo = iif(Supp_contact.isblank()=false,suppid+"/"+supp_contact,suppid+"/"+name1) faxNumber = phoneNum ; from form or table lookup faxSetPriority = strval(intSetPriority) ; make ActFax command string STdatafield="" STdatafield="@F5010@" STdatafield=STdatafield+"@F311"+mylib.getusername( )+"@" ; User name STdatafield=STdatafield+"@F201"+faxTo+"@" ; Fax to STdatafield=STdatafield+"@F315"+userID+"@" ; Userid STdatafield=STdatafield+"@F308"+faxCompany+"@" ; Fax company STdatafield=STdatafield+"@F307"+faxSubject+"@" ; Fax subject STdatafield=STdatafield+"@F314"+STsetHold+"@" ; Hold (True=1) STdatafield=STdatafield+"@F301"+faxSetPriority+"@" ; Priority (H=25/N=50) STdatafield=STdatafield+"@F3132@" ; Resolution STdatafield=STdatafield+"@F211"+faxNumber+"@" ; set printer options repPrintinfo.paneloptions=printcliptowidth repPrintInfo.nCopies = 1 repPrintInfo.Orient = 1 ; write command string to hard drive and use to control print options success=false if mylib.makeFieldsDat0(STdatafield) then sleep() if POrpt.print(repPrintinfo) ; ActFax automatically looks for command string in specified location on hard drive then sleep() success=true if porpt.close() then sleep() endif endif endif OTHERWISE : ENDSWITCH |
#8
| |||
| |||
|
|
"@F..." are not very evocative commands... |
|
Your code does not show how command STdatafield is sent to actfax, maybe it is inside makeFieldsDat0()? |
![]() |
| Thread Tools | |
| Display Modes | |
| |