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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email Through VFP Report

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
it's my problem that i send a email through vfp.
mean that when i preview a vfp report i can send it directly from visual fox pro report not through form.
 
Since the VFP report only has to options (Preview or Print) you need to have third option that allows you to create a file to attach to an e-mail message. A PDF file is one option. If you have Adobe Acrobat (the full version), you can use Adobe acrobat's printer driver to create a PDF file from the report and use it as an attachement. If you need to do this from the preview, I would use:
Code:
REPORT FORM myReport.frx TO PRINTER PROMPT PREVIEW
This will allow you to preview AND send the report to the printer, select Adobe Acrobat, create you PDF file, and right after that you can automate Outlook to e-mail the newly create PDF file.

The above example could also be done with a library called "FRX2Word" (available at whch will create a word document from your VFP report, and you can attach that to the e-mail.
 
I have to use the VFP report form to generate a document for each of our district offices, then email them. Naturally, you don't want to force the user to have to do anything other than watch the program run. I see in VFP help that I can say SET PRINTER TO NAME and specify "Acrobat PDFWriter", but how do I pass it the Acrobat output filenames from my program? There will be over 30 of them, so having it automated is mandatory.
 
This problem has plagued me for a loooong time. I have struggled with to file ascii and then went into Word and reformatted the report -- very painful. I downloaded FRX2WORD because it sounded exactly what I needed. But the sample doesn't work! and even if it did, I am not sure where that it will tell me where to put the code to create a Word version of the report. Can someone explain how and where to use FRX2WORD.

Thanks
 
There are 2 "frx2word"'s out there, I found. The one I downloaded and got to work is version 2.50 written by John S. Koziol and Fabio Vieira. If this is the one you have, read the frx2word.doc file. Copy the two class files msoexp.vcx and .vct to your application's directory. Add the recommended code to your program, starting with:
set classlib to msoexp
oF2w=newobject("frx2word","msoexp")
After that, invoke the parameters you want to use.
I used oF2w.savefolder, oF2w.reporthome, and oF2w.doc_filename.
Then either say GO TOP in your program or invoke the scope parameter of the class, and fire it up:
nsuccess=oF2w.reportform("yourreportform")
 
Fabio is the current supporter of that class. Maybe he can help you.
fabio.storm@uol.com.br

There is also included a readme1st.doc that might help you.

There also a free way to create a PDF document in the F.A.Q. faq184-2143
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top