Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Junior Member
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 284
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing EXCEL tables with sophisticated HP Printers such as the D VAUTOUR 110 Excel Discussion (Misc queries) 1 June 3rd 09 09:58 PM
Excel 2007 Margins Cut Off Printing to Non-Physical Printers CEK Excel Discussion (Misc queries) 0 March 13th 08 03:46 PM
Printing on different printers (makes/models etc) Chuckee Excel Discussion (Misc queries) 1 February 23rd 07 03:52 PM
formating issues when printing using different printers Andres Setting up and Configuration of Excel 1 May 26th 05 01:46 PM
printing to multiple printers gkm107 Excel Programming 2 February 21st 05 01:43 PM


All times are GMT +1. The time now is 02:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"