hi Yashodhan
the ??? has the disadvantage of spitting out blank pages before printing. i have found the easiest way is using an API as follows:
if file("yourfile.txt")
DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
STRING @SourceFileName, ;
STRING @DestFileName, ;
INTEGER bFailIfExists
CopyFile("yourfile.txt","LPT1:",0)
else
messagebox('File not available for printing...',0+48+0,'Printer Error....')
endi
*The following are valid examples of invoking CopyFile() after it was DECLARED:
*CopyFile('C:\MyFile','LPT1:',0) && LPT1:
*CopyFile('D:\Temp\MyFile','PRN:',0) && the default printer
*CopyFile('\\MyServer\MyShare\MyFile','\\SomeServer\SharedPrinter',0)
hth
john
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only