[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Printing to another port

Posted on 2000-03-02
1
Medium Priority
?
133 Views
Last Modified: 2010-08-05
I  have 2 printers attached to my machine, (LPT1: and LPT2:). How do I print to LPT2? I do not want to use Open# and Print# statements.
0
Comment
Question by:dmoore2
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 32

Accepted Solution

by:
Erick37 earned 200 total points
ID: 2578637
Loop thru the Printers collection until you find a printer that meets your requirements:

e.g.

Dim p As Printer
For Each p In Printers
    If (p.Port = "LPT2:") And (p.DeviceName Like "*LaserJet*") Then
        ' Set printer as system default.
        Set Printer = p
        Debug.Print Printer.DeviceName
        ' Stop looking for a printer.
        Exit For
    End If
Next
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question