473,320 Members | 2,071 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,320 software developers and data experts.

Print reports to a specific printer and manual feed tray

AllusiveKitten
Hi kind and helpful people...

At work I am creating a database and reports that will be used by multiple people. What I need is for my reports to print to a specific colour printer and be manual feed as the papersize is different.

The following coding does select the printer that I require on my computer, but as different people have different printers loaded to their machines the number of printers and the orders vary, so my coding falls down as the particular printer I am requiring is a different number on other computers.

Expand|Select|Wrap|Line Numbers
  1. Sub SelectPrinter()
  2.  
  3. Dim Prn As Printer
  4. Dim Names() As String
  5. Dim I As Integer
  6.  
  7. ReDim Names(Application.Printers.Count - 1)
  8. For I = 0 To Application.Printers.Count - 1
  9.   Names(I) = Application.Printers(I).DeviceName
  10.   Debug.Print Application.Printers(I).DeviceName
  11. Next
  12.  
  13. Set Application.Printer = Application.Printers(1)
  14.  
  15. End Sub
In addition to my issue, I don't know how to code in the manual feed tray.

Thank you for your help

AK
Oct 8 '07 #1
0 1764

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

Similar topics

0
by: Ian | last post by:
(Sorry if I have repeated this, it did not appear the first time) I have the following code on a button. The idea is that when this button is clicked it prints several reports automatically then...
0
by: Bill Hymel | last post by:
Access Printing - Just wondering if you have a solution for this problem - I need to be able to print an Invoice with the 'terms and conditions' on the back side of an Invoice. To do this, I...
0
by: CsaaGuy | last post by:
Hi, I am using Active Reports and when a report is run, i need to point the report to a specific printer and tray. I tried this by setting the selected report properties however it didn't do...
5
by: Fred Nelson | last post by:
Hi: I'm trying to write a program that will print envelopes using a HP Laserjet 4 that has three trays. In the future this program will work with other printers so I don't want to "hard code"...
4
by: dgk | last post by:
Anybody have any code for selecting an appropriate printer and printing an envelope? Greatly appreciated.
1
by: matpublic | last post by:
Hi, I'm using reporting services (localreport) to generate multiple PDF reports. These individual reports (documents) need to be printed together using different trays on the printer (Doc A...
12
by: Jchick | last post by:
Boy, this should be a simple bit of code but I can't figure out how to make it happen. I have a CSV file shows up in a directory that has 4 fields that need to be printed on labels. Each line of...
1
by: gwong | last post by:
How can I tie window.print() to a specific printer? I've created a print button but don't want the pop up to occur that gives the printer selections. I am trying to minimize the number of clicks...
10
by: Snoopy33 | last post by:
I have a DB that I developed on access XP (2002) and deployed over a year ago. No one has had problems printing any of the reports within the DB until we started loading 2007 on new computers. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.