By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,187 Members | 1,038 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,187 IT Pros & Developers. It's quick & easy.

Change printer in vbscript

drhowarddrfine
Expert 5K+
P: 7,435
I have a simple vbscript that extracts a web page, saves it to a file, then uses notepad to print that file to the default printer. What can I do to make it print to a specified non-default printer?

Expand|Select|Wrap|Line Numbers
  1.  
  2.     txtfile.WriteLine(xmlhttp.responseText)
  3.     txtfile.Close
  4.     'enable this to print
  5.     'oWS.Run "NotePad.exe /p " + path
  6.  
Unrelated, the page printed is set for letter size paper width so some lines print a few characters, then fill the rest of the line with blank spaces. The default printer is an Epson receipt printer that's only 24 chars wide (I'm guessing). It prints very slowly compared to receipts that are printed by the computer's cash register software. Any idea why this is so?
Dec 7 '08 #1
Share this Question
Share on Google+
3 Replies


Frinavale
Expert Mod 5K+
P: 9,731
Have you seen this article?
Dec 8 '08 #2

drhowarddrfine
Expert 5K+
P: 7,435
Just scanning it there could be some good info there. Thanks.
Dec 8 '08 #3

Frinavale
Expert Mod 5K+
P: 9,731
Moved your question to ASP.
Apparently this is where you ask VBScript questions....
Dec 8 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.