Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 55
Default Listing ActivePrinters

Hi all,

Is there a way to list all the active printers for the application?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
listing top to bottom. Killer Excel Discussion (Misc queries) 1 June 6th 07 03:10 AM
sum and listing Andreas5516 Excel Discussion (Misc queries) 2 February 4th 05 10:44 PM
Listing of one cell controlling the listing of another cell. peijuan Excel Programming 0 August 8th 04 03:17 AM
Macro name listing Otto Moehrbach[_5_] Excel Programming 2 September 20th 03 04:24 PM
Data mix and listing Tom Ogilvy Excel Programming 2 September 5th 03 04:36 AM


All times are GMT +1. The time now is 08:33 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"