emery


Hi,

I tried #2 method and stuck. Then I tried #1 method, it works for report with graphic. However, I need a way to pass parameters to Send Fax Wizard.

Thanks for your help.

Emery

------------------------------------------------------------------------------------------------------------------------------

Method #1:

When I used the following code to fax a report (which also contains graphic/image), Windows XP Send Fax Wizard came up:

....

SET PRINTER TO NAME 'FAX'
REPORT FORM (fform) TO PRINTER

Does anyone know how to programmatically pass recipient's info (name, fax #, etc) to Send Fax Wizard

------------------------------------------------------------------------------------------------------------------------------

Method #2:

The following codes work only for pure ASCII text:

.....

myFaxDocument = createobject("FaxComEx.FaxDocument")
myFaxSender = myFaxDocument.Sender
myFaxSender.LoadDefaultSender()
myFaxDocument.Subject = "Test"
myFaxDocument.Recipients.Add(faxnumb, name)

REPORT FORM (fform) TO FILE (faxFile) ASCII

myFaxDocument.Body = (faxFile)

myFaxDocument.Submit(ServerName)
......

However, if I omit ASCII option (my report alos contains image/graphic), it printed out PCL text if I name the output file using '.txt' extension. (This is because the report got rendered is of printer driver format, in my case PCL).

It failed if I name the output file using '.pcl' extension because FaxDocument.Body only supports .txt, .doc and .xls extensions,

Does anyone know how to resolve it

----------------------------------------------------------------------------------------------------------------------------





Re: VFP Fax Integration

dni


You may find an other method :

http://fox.wikis.com/wc.dll Wiki~TapiFaxAutomation~VFP







Re: VFP Fax Integration

emery

Hi DNI,

Thanks for the link. However, it doesn't solve my problem since it still uses word document.

My requirement is to send bunch of VFP Reports which contained graphic/image. Also Converting each VFP report to a word document is not acceptable because new reports may keep coming.

Emery






Re: VFP Fax Integration

dni

It you like to send direct to fax I think you will need a "fax driver" more performant. I think "a all in one" printer-fax machine is doing that and you will need just to send it to print ...

You may also convert reports to pdf or html...






Re: VFP Fax Integration

emery

Direct convert VFP reports (with graphic) to other format (doc, pdf, ..) is not feasible, Alternative is to convert the printer output (which already rendered garphic/image objects with text) to it (pdf, tiff,..). Then, you have to deal with different printer driver languages (PCL, PS,..).

That's why I prefer method #1, but I need a way to pass parameter to Send Fax Wizard to make it transparent to users.

Emery





Re: VFP Fax Integration

Naomi Nosonovsky

Try this tip from Jaime Pinto from another forum:

===================================================================================

I have been using the following method for years, in functions that send thousands of TIF docs / day. You will only need to install the Fax printer that comes with Windows XP in case it's not installed.

set printer to name "Fax"
report form myReport to file "myfile.tif" noconsole




Re: VFP Fax Integration

emery

Thanks, Naomi. It works. -Emery





Re: VFP Fax Integration

Naomi Nosonovsky

Jaime gets the credit for this great tip.





Re: VFP Fax Integration

PeterCSI

Hi Emery, I don't know you, but I was reading your development project and decided to post a question to you. Perhaps your expertise can assist me in my priority level project.

Here's my question: What are the command statements that I can use in Visual Foxpro ver6.0 to dial a list of phone numbers.

Elaborate: I have a list of phone numbers in Excel, and I want foxpro to dial each number for me in sequential order.

Please E-mail me your response, or call me at 407.232.4518. Honestly, I'd rather you call. My E-mail might fail.

or try this email jerazo254@yahoo.com






Re: VFP Fax Integration

emery

Peter,

To send fax to multiple recipients, repeat FaxDocument.Recipients.Add() command. For example,

myFaxDocument.Recipients.Add("1111111111","FirstPerson")

myFaxDocument.Recipients.Add("2222222222","SecondPerson")

Hope this helps.

Emery






Re: VFP Fax Integration

emery

Hello,

As I mentioned, the above method Jaime provided works very well for VFP6. However, I encountered the following Program Error when I compiled and ran my program using VFP9:

OLE IDispatch exception code 0 from FaxComEx.FaxDocument.1: Operation failed...

I found I can avoid the problem by selecting Fax device in 'Printer and Faxes' window and 'Set it as Default Printer' before running my program (I don't need to do this with VFP6). But it is not a good solution.

Does anyone know how to resolve the problem

Thanks,

Emery