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

Print TXT file 1

Status
Not open for further replies.

konLao

Programmer
Mar 10, 2003
61
US
Dear all,
I try to print TXT file to the default printer in VFP 6.0. I use TYPE filename.txt TO PRINTER. It printer to the printer and also screen too. Is there any other way to do this...like shellexecute?.

konlao
 
HI

DECLARE INTEGER ShellExecute IN shell32.dll ;
INTEGER hndWin, STRING cAction, STRING cFileName, ;
STRING cParams, STRING cDir, INTEGER nShowWin

ShellExecute(0,"PRINT",myFile,"","",1)

Is this what you are looking for ?
(Print in printer and no display in screen)

ramani :)
(Subramanian.G),FoxAcc, ramani_g@yahoo.com

 
ramani,
This is what i'm looking for. Thank you for the quick response.

konlao
 
ramani

I suspect a typo?

ShellExecute(0,"PRINT",myFile,"","",1)

should be

ShellExecute(0,"PRINT",myFile,"","",0)



FAQ184-2483 - the answer to getting answered.​
Chris [pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top