473,587 Members | 2,225 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Print reports to a specific printer and manual feed tray

AllusiveKitten
43 New Member
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 1782

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

Similar topics

0
2255
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 loops through several other reports and prints them. These reports are not sent to a printer but sent to a program called Fine Print PDF Factory...
0
2206
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 would load preprinted paper (with the terms and conditions already printed on the back side) into a different paper tray than the default paper tray....
0
260
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 anything. I still had to set the printer and tray with the dialog box. Does any one know anything about this? thanks.
5
14450
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" (or send raw output) to accomplish this. I'm trying to figure out how to set the PaperSource property and haven't had any luck! I've searched...
4
2826
by: dgk | last post by:
Anybody have any code for selecting an appropriate printer and printing an envelope? Greatly appreciated.
1
1554
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 from tray 1, Doc B from tray 2). The problem I have is that this is a multi user system and so if two users were printing at the same time, the...
12
2298
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 the CSV looks something like this: AcctNo, Name, junk, junk, Address, junk, PhoneNo I need to read each line of the CSV and print them to...
1
2646
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 required to print. However, I want to tie my print button to a specific printer and print tray. In a config will i will read in the printer queue name...
10
9115
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. The access 2007 users cannot print one of the reports. This is maddening since I cannot duplicate the issue on any computer that runs 2003 or below....
0
7915
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7843
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8205
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8339
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7967
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3872
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.