View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RobC[_3_] RobC[_3_] is offline
external usenet poster
 
Posts: 11
Default Listing Printers in Excel

Need a little help trying to list Printers in Excel. I have a sheet I
would like to print directly to Acrobat PDF Writer and on my PC it is
"Acrobat PDFWriter on LPT1" but this workbook is used by many and others
Acrobat appears to be installed differently. Currently I try to set the
active printer to "Acrobat PDFWriter on LPT1" and then test to see if it
set, if it fails, I bring up the Print dialog.


On Error Resume Next
Application.ActivePrinter = "Acrobat PDFWriter on LPT1:" 'Set Printer

If ActivePrinter = "Acrobat PDFWriter on LPT1:" Then
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:
="Acrobat PDFWriter on LPT1:"

Else 'PDF Writer does not appear to be installed
ActiveWindow.SelectedSheets.Application.Dialogs(xl DialogPrint).Show
End If

I was hoping to get access to the list of printers then do some
manipulation to find PDF Writer, then choose this printer.

I see MS Access has Printer Collection but nothing in Excel.

Any help would be greatly appreciated...

Thanks,
Rob