Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 44
Default Printers & LPT

Hi

With the following script I can see all printers:

Private Sub ListPrinters()
Dim wshNetwork As Object
Dim oDrives As Object
Dim oPrinters As Object
Dim iCount As Integer
Dim sCurrentprinter As String
sCurrentprinter = Application.ActivePrinter
Set wshNetwork = CreateObject("WScript.Network")
Set oDrives = wshNetwork.EnumNetworkDrives
Set oPrinters = wshNetwork.EnumPrinterConnections
For iCount = 0 To oPrinters.Count - 1 Step 2
MsgBox oPrinters.Item(iCount + 1)
Next
End Sub


Now I'd like to know to which port (LPT) the printers are connected. How to
do?

Tom


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
LABEL PRINTERS CFAVRE Excel Discussion (Misc queries) 0 August 4th 08 05:06 PM
List of available printers prizm1 New Users to Excel 3 June 12th 05 01:32 PM
Creating a printers list PO Excel Programming 2 November 14th 03 01:51 PM
Enumerating Printers Michael D. Ober[_2_] Excel Programming 8 October 21st 03 01:25 PM
List of Printers Bret Holle Excel Programming 1 September 27th 03 04:39 PM


All times are GMT +1. The time now is 01:18 AM.

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"