Results 1 to 3 of 3
Thread: Change printer using VBScript
Dec 8, 2008, 08:14 #1
Change printer using VBScript
I have a simple script that takes a txt file and prints it using notepad. The problem is that it prints to the default printer which I do not want. I'd like it to print to a second installed printer without changing the default.
This is all I do to print:
oWS.Run "NotePad.exe /p " + path
Dec 8, 2008, 08:24 #2
- Join Date
- Nov 1999
- Mechanicsburg, PA
- 116 Post(s)
- 1 Thread(s)
From what I've dug up via google (haven't tested it, but it's worth a try...)
notepad.exe /pt %1 %2 where %1 is the filename and %2 is the printer name.
As for your second question, can you clear out the extra spaces? On some of the older style printers (note I said older style, not older), the spaces will still be "printed" so that will cause time to handle the effort.
Dec 8, 2008, 08:40 #3
Aha! Good. I googled for notepad options and found that. Thank you. I'll change that later and try it out. (I know nothing of VBScript and the script I'm using was written by some Windows guy.)