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

send TextFile to Printer...

Status
Not open for further replies.

VBFOXDEV35

Programmer
Mar 26, 2001
77
US
Hello all. I am trying to send a text file which is created in code to the printer. I have tried to use the report form XXX to Printer/File and it is not working for me. Is there a command that can just take a text file and send it strait to the printer without useing report form, adobe, etc. The text file I have is not Post script so distiller is out, and the following code is to dam slow because when I create the report form, I am over 40+ pages:
IF FILE (strDir + "\fqcm.txt")
USE strTables + "\tblreport.dbf" EXCLUSIVE
ZAP
GO TOP
APPEND BLANK
APPEND MEMO comments FROM fqcm.txt && Add contents of text file
CLOSE DATABASES
SET PRINTER TO NAME "Acrobat PDFWriter"
SETPDFFILE(V1PDFFILE)
ACR = CreateObject("AcroExch.App")
AV1 = CreateObject("AcroExch.AVDoc")
REPORT FORM myreport TO PRINTER
ENDIF
AV1.Open(ALLTRIM(V1PDFFILE), "Report")
ACR.Show

The only other alternative I can think of is using a Word Object and bring in the text file and format it in code. Any suggestions??? I am trying to optomize my speed for this typical report. Thanks all for your help.

Arty
 
Jim, that worked great, thanks. At times it is the little things one forgets. But here is a catch, how to get it to be landscape???

Arty
 
Jim, sorry, without using the prompt command. I already set the default printer in another location in my program.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top