Experts Exchange connects you with the people and services you need so you can get back to work.
Public Sub PrintToSpecificPrinter(strPrinter As String)
'Created by Helen Feddema 12-Feb-2010
'Last modified by Helen Feddema 12-Feb-2010
On Error GoTo ErrorHandler
Dim strDefaultPrinter As String
'Save current default printer
strDefaultPrinter = Application.ActivePrinter
Debug.Print "Current default printer: " & strDefaultPrinter
'Select a specific printer as new default printer
Application.ActivePrinter = strPrinter
'Print the current document
'Set printer back to former default printer
Application.ActivePrinter = strDefaultPrinter
MsgBox "Error No: " & Err.Number & "; Description: " & _
Open in new window
Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Public Function ListPrinters()
'Lists Access printer names as used in VBA code
'to the Immediate window
Dim prt As Access.Printer
For Each prt In Application.Printers
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $159.20.
Premium members get this course for $18.75.
Premium members get this course for $12.50.
Premium members get this course for $389.00.
Premium members get this course for $31.25.
Premium members get this course for $151.20.
Premium members get this course for $122.40.