ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Available Printer names to be placed in a range on a sheet and Force selection based on part of Printer name (https://www.excelbanter.com/excel-programming/418020-available-printer-names-placed-range-sheet-force-selection-based-part-printer-name.html)

Corey

Available Printer names to be placed in a range on a sheet and Force selection based on part of Printer name
 
~~~~~~~~~~~~~~~~~~~~~
Sub Select_Printer()
'List of ALL available printers on the active PC
Dim bOK As String
bOK = Application.Dialogs(xlDialogPrinterSetup).Show
If bOK = False Then Exit Sub
If bOK = True Then
ActiveSheet.PrintOut
End If
End Sub
~~~~~~~~~~~~~~~~~~~~~
I use the above code to display what printer to be used on my PC, but i now
want to FORCE what Printer is selected.
However each user on the Network, does not have the SAME Printer Name as
mine.
I placed the Printer Name i use in a cell and refer to that when printing,
and it works fine.

Is there a way to modify the above code to place each Printer name in a
range in the activesheet starting at : Range("S3") and working down the
columns?
Also i need to FORCE the printer chosen, by Code finding the one with 'PDF'
in it's name.

Each user may have a different pdf Printer name like:

PDFFactory
PDFPrinter
PdfPrint

If i can come up with a code that will places the available printers in the
sheet starting at S3, then
Search the range for part of the printer name to include pdf or PDF and then
Ensure that Printer is Selected, that would be the ulitmate solution.



--
Corey ....
The Silliest Question is generally
the one i forgot to ask.




All times are GMT +1. The time now is 03:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com