Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting printer paper source in code.... 1

Status
Not open for further replies.

GWhiz

Programmer
Dec 16, 1999
49
US
Hi, folks!<br><br>Customer has a printer which has 3 different feed trays for paper.&nbsp;&nbsp;He uses different color sheets for different forms.<br><br>Paper source can be selected in code (like an event procedure when pressing a command button) using an &quot;escape sequence&quot; (defined in the printer manual).<br><br>Question:&nbsp;&nbsp;what is syntax for sending an escape sequence to a printer in code?<br><br>Used to be as simple as using &quot;LPrint&quot; (back in the olden days before Windows) -- but not sure what it is any more.<br><br>Anyone had any experience doing something like this?<br><br>Thanks so much for any help....<br><br>Doug
 
any printer settings you set with escape sequences will be reset when the application prints the document.<br><br>so, add the printer in windows three times (start, settings, printers, add new printer).<br>call them something like RED, YELLOW, GREEN.<br>set the default paper tray (properties, paper, paper source) in each to the requisite one.<br>then you can point Application.ActivePrinter at them from code...<br><br>and even if it did work, it's probably not a good idea to hard-code escape sequences into your code, since should the client use a different printer you'll need to redistribute.<br><br>hope this helps.<br><br>mr s. &lt;;)<br>
 
Just want to thank you, mr. s, for your help.&nbsp;&nbsp;Your suggestion solved the problem neatly and quickly.&nbsp;&nbsp;Probably wouldn't have thought of it myself -- at least not until I beat my head against the wall for a while longer.<br><br>May the great force of cosmic kindness bring an appropriate solution to one of YOUR questions soon.<br><br>Thanks again.........
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top