In message <41**********************@news.zen.co.uk>, Trevor Best
<no****@besty.org.uk> writes
Scott Simonson wrote: Try "copy textfile.txt prn" in a shell command. Haven't done this in
a while and don't want to test this right now.
I was going to suggest something similar but using VBA to open LPT1,
but then remembered we aren't in DOS anymore and printers do come in
network and USB flavours :-)
If your system has a copy of Wordpad on it you can issue a shell command
like
"c:\program files\windows nt\accessories\wordpad.exe" /p stuff.txt
This will print the file stuff.txt to the default printer. You can do
the same with Word (or many other Windows programs.) If you use Word you
can use a command line switch to execute a macro. The macro could format
the text, apply a page header etc.
Alternatively you could use docomd.transfertxt to import the text file
to an access table and then run a fancy report against the data.
--
Bernard Peek
London, UK. DBA, Manager, Trainer & Author. Will work for money.