Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing outside of excel and selecting printers
HI all and thanks in advance for your time to read and hopefully
answer the quandry I'm in. I have been trying to develop a macro that I can embed into a whole bunch of existing Drawing register files. which have lists of upto 50 drawings per workbook within the spreadsheet. What I need to be able to do is find a way that will allow me to select via the Windows API a list of available printers. From this I will be using an if statement to select the relevant printer dependant on the size of the drawing to be printed off. I will be mainly controlling adobe acrobat reader and DWF viewer. So my original paths of using the printto verb didn't seem to be working. Many thanks in advance David Armstrong |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Printing outside of excel and selecting printers
David,
WMI might not be the best option if you will be running your routine on PCs with Win98 or earlier OS but otherwise it is simpler to use than Windows API. The routine below could probably be modified to give you what you need. __________________________________ Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set colPrinters = objWMIService.ExecQuery("Select * From Win32_Printer") For Each objPrinter In colPrinters MsgBox objPrinter.Name Next objPrinter __________________________________ Steve "ArmsteR" wrote in message ups.com... HI all and thanks in advance for your time to read and hopefully answer the quandry I'm in. I have been trying to develop a macro that I can embed into a whole bunch of existing Drawing register files. which have lists of upto 50 drawings per workbook within the spreadsheet. What I need to be able to do is find a way that will allow me to select via the Windows API a list of available printers. From this I will be using an if statement to select the relevant printer dependant on the size of the drawing to be printed off. I will be mainly controlling adobe acrobat reader and DWF viewer. So my original paths of using the printto verb didn't seem to be working. Many thanks in advance David Armstrong |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Printing EXCEL tables with sophisticated HP Printers such as the D | Excel Discussion (Misc queries) | |||
Excel 2007 Margins Cut Off Printing to Non-Physical Printers | Excel Discussion (Misc queries) | |||
Printing on different printers (makes/models etc) | Excel Discussion (Misc queries) | |||
formating issues when printing using different printers | Setting up and Configuration of Excel | |||
printing to multiple printers | Excel Programming |