473,386 Members | 1,819 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Change printer in vbscript

drhowarddrfine
7,435 Expert 4TB
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
3 4120
Frinavale
9,735 Expert Mod 8TB
Have you seen this article?
Dec 8 '08 #2
drhowarddrfine
7,435 Expert 4TB
Just scanning it there could be some good info there. Thanks.
Dec 8 '08 #3
Frinavale
9,735 Expert Mod 8TB
Moved your question to ASP.
Apparently this is where you ask VBScript questions....
Dec 8 '08 #4

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

Similar topics

8
by: kchengso | last post by:
One of my printers in my printer.devicename call returns in lower case. Is it possible for me to change it to upper case? I am also wondering how, in the first place, this particular printer...
1
by: Paul White | last post by:
I've written a POS system for a client, but we're having problems with the customer receipt printing. The printer has a left margin gap of about 1 inch. I need to reduce that left margin width in...
1
by: James | last post by:
how come when i print programicly my printer says "data received" and it won't print until i press the GO button on the printer? my printer is a HP laser jet 5 Set objFS =...
16
by: cyranoVR | last post by:
This is the approach I used to automate printing of Microsoft Access reports to PDF format i.e. unattended and without annoying "Save As..." dialogs, and - more importantly - without having to use...
5
by: Hank | last post by:
My Access 2000 code has been running for several years in our main plant. Now we need to install it, as a stand-along application, at remote sites, some of which are out of state. My problem is...
1
by: PCB | last post by:
Hi all! I have a subroutine that prints reports on a specific printer. The code works fine as long as all the printers available to the computer are on the network. However, if the computer also...
7
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change...
5
by: itfetish | last post by:
I have made an electronic sign out book for my office in ASP using VBScript. Problem is, when there is a fire we need to check who is out and who is burning. I have been trying to think of how...
8
drhowarddrfine
by: drhowarddrfine | last post by:
I have a simple VBScript that goes on the 'net, fetches a page from a specific URL, and prints it on the default printer. The problem is I need that page to print on the secondary printer. VBScript...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.