send text to printer

T

tw

How do I send data stored in a string variable directly to the printer?
How do I send a .txt file to the printer?
 
J

John Nurick

You can send a text file to the default printer by shelling to Notepad,
something like this:

Dim strCmd as String
Dim strFileSpec As String

strFileSpec = "D:\Folder\Text file.txt"

strCmd = Environ("SystemRoot") & "\System32\Notepad.exe /p """ _
& strFileSpec & """"

Shell strCmd

After that things get more complicated.
 
Top