Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Listing ActivePrinters
Hi all,
Is there a way to list all the active printers for the application? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Listing ActivePrinters
http://groups.google.com/groups?selm...&output=gplain
Not sure why you can't popup the built in printer selection dialog. Sub TestDialog() Application.Dialogs(xlDialogPrinterSetup).Show End Sub But here is some information: http://support.microsoft.com/?id=166008 ACC: Enumerating Local and Network Printers Athough the above article is for Access, the code works in Excel as well. Enumerating Windows' Available Ports http://www.mvps.org/vbnet/code/enums/enumports.htm ======================= This posting by Jim Rech may be useful as well - certainly simpler: ========< J Rech Post ======= From: "Jim Rech" Subject: Setting active printers will Excel 97 VBA Date: Thu, 19 Oct 2000 14:04:56 -0400 Lines: 9 Newsgroups: microsoft.public.excel.programming This macro enumerates printers and their connections. Parsing it you may be able to construct the syntax ActivePrinter wants: Sub a() Set WshNetwork = CreateObject("WScript.Network") Set oDrives = WshNetwork.EnumNetworkDrives Set oPrinters = WshNetwork.EnumPrinterConnections For i = 0 To oPrinters.Count - 1 Step 2 Debug.Print "Port " & oPrinters.Item(i) & " = " & _ oPrinters.Item(i + 1) Next End Sub -- Jim Rech Excel MVP =========< J Rech Post ===== -- Regards, Tom Ogilvy "exceller" wrote in message ... Hi all, Is there a way to list all the active printers for the application? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
listing top to bottom. | Excel Discussion (Misc queries) | |||
sum and listing | Excel Discussion (Misc queries) | |||
Listing of one cell controlling the listing of another cell. | Excel Programming | |||
Macro name listing | Excel Programming | |||
Data mix and listing | Excel Programming |