Can you have an excel Quick Print to print to a specific printer? I have
multiple printers and would like to have multiple print icons on the Quick
Acces toolbar, each pointing to a different printer.

Thanks, Will

Re: Quick Access Toolbar icons by Ron

Ron
Fri Jun 06 17:40:30 CDT 2008

Hi will

Yes this is possible

Add a icon to the QAT and asign the "test" macro to print to the pdf printer for example

Right click on the QAT and choose Customize Quick Access Toolbar.
If you select "Macros" In the "Choose commands from" dropdown and add a macro button to the QAT
you are able to use the Modify button to choose from 181 images

Sub Test()
Dim str As String
Dim strNetworkPrinter As String
str = Application.ActivePrinter

strNetworkPrinter = GetFullNetworkPrinterName("Adobe PDF")
If Len(strNetworkPrinter) > 0 Then
Application.ActivePrinter = strNetworkPrinter
ActiveSheet.PrintOut
End If

Application.ActivePrinter = str
End Sub


Function GetFullNetworkPrinterName(strNetworkPrinterName As String) As String
Dim strCurrentPrinterName As String, strTempPrinterName As String, i As Long
strCurrentPrinterName = Application.ActivePrinter
i = 0
Do While i < 100
strTempPrinterName = strNetworkPrinterName & " on Ne" & Format(i, "00") & ":"
On Error Resume Next ' try to change to the network printer
Application.ActivePrinter = strTempPrinterName
On Error GoTo 0
If Application.ActivePrinter = strTempPrinterName Then
GetFullNetworkPrinterName = strTempPrinterName
i = 100 ' makes the loop end
End If
i = i + 1
Loop
Application.ActivePrinter = strCurrentPrinterName ' change back to the original printer
End Function




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Will" <will@k2e.com> wrote in message news:9D679572-8863-4AF9-B1CB-0C91704C62BE@microsoft.com...
> Can you have an excel Quick Print to print to a specific printer? I have
> multiple printers and would like to have multiple print icons on the Quick
> Acces toolbar, each pointing to a different printer.
>
> Thanks, Will
>