G Guest May 25, 2005 #1 How do I send data stored in a string variable directly to the printer? How do I send a .txt file to the printer?
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 May 26, 2005 #2 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.
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.