General information
Category:
Reports & Report designer
Title:
Trying to send a non-text file to print
My company currently sends reports to files for archiving purposes, and then prints them at a later time. They send them in ASCII style, so it's really just a text file. I'd like to be able to just send them not in ASCII format, because I want all of the lines, fonts, etc., to be used, but I'm not sure how to send it to print once it has been send to file. I asked a question earlier that sent me in the right direction (I believe), but I can't seem to get it to work.
Here's what I'm doing:
DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
STRING @SourceFileName, ;
STRING @DestFileName, ;
INTEGER bFailIfExists
IF CopyFile('c:\whatever.tmp','LPT1:',0) != 0
* It worked
ELSE
* It didn't
ENDIF
It never works for me. I've tried changing the port name ("LPT1:") to different ports and printer names, but it always returns a 0 and never prints. Am I doing something wrong. FYI, I'm using VFP5.
Jeremy
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