Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trying to send a non-text file to print
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Title:
Trying to send a non-text file to print
Miscellaneous
Thread ID:
00329489
Message ID:
00329489
Views:
60
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
Map
View

Click here to load this message in the networking platform