berrya
07-19-2001, 05:04 PM
I know how to print text files using the Word.Document object, however I have a situation where I wish to print a plain txt file to the printer without using the the Word object model. I can Open, Close Read from and Write to plain text files, using VBA commands, but can't figure out how to print to the printer. Can anyone help with this one?
KesleyK
07-20-2001, 09:10 AM
One way is to place the text in your WorkSheet, then use:
ActiveSheet.PrintOut
______
Cheers!
KesleyK
07-20-2001, 09:11 AM
Oops, you're probably using Word VBA, sorry.
______
Cheers!
berrya
07-24-2001, 11:13 PM
Firstly, thankyou for your response.
I'm actually using Access VBA, the thing is that I want to be able to print out a log file without the overhead of using the Word or Excel Application objects to access the file for printing. I just want to send the file to the printer as a text file.
VBA doesn't seem to be able to directly with the printer, so I am thinking that I might have to make some Windows system calls to gain direct access to the printer.
What do you think