ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printer Dialog Box (https://www.excelbanter.com/excel-programming/297371-printer-dialog-box.html)

Todd huttenstine

Printer Dialog Box
 
Hey

Using code, how would you make the printer dialog box come
up?

Also without showing the dialog box, is it possible to
list all the available printers?

Thank you
Todd Huttenstine

Tom Ogilvy

Printer Dialog Box
 
Your first question was already answered by Frank in response to your last
post.

Yes it is possible and there are several methods. This has been asked many
times - see

http://groups.google.com/advanced_group_search?hl=en

--
Regards,
Tom Ogilvy


"Todd Huttenstine" wrote in message
...
Hey

Using code, how would you make the printer dialog box come
up?

Also without showing the dialog box, is it possible to
list all the available printers?

Thank you
Todd Huttenstine




Frank Kabel

Printer Dialog Box
 
Hi Todd
as in your other post:
application.Dialogs(xlDialogPrint).Show


--
Regards
Frank Kabel
Frankfurt, Germany


Todd Huttenstine wrote:
Hey

Using code, how would you make the printer dialog box come
up?

Also without showing the dialog box, is it possible to
list all the available printers?

Thank you
Todd Huttenstine


Frank Kabel

Printer Dialog Box
 
Hi Tom
seems your link is truncated :-)
For the OP: Below a repost (I thinks it's from Tom and/or Jim Rech):
-----
http://support.microsoft.com/support.../q166/0/08.asp
ACC: Enumerating Local and Network Printers

Enumerating Windows' Available Ports
http://www.mvps.org/vbnet/code/enums/enumports.htm
=======================

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




--
Regards
Frank Kabel
Frankfurt, Germany


Tom Ogilvy wrote:
Your first question was already answered by Frank in response to your
last post.

Yes it is possible and there are several methods. This has been
asked many times - see

http://groups.google.com/advanced_group_search?hl=en


"Todd Huttenstine" wrote in
message ...
Hey

Using code, how would you make the printer dialog box come
up?

Also without showing the dialog box, is it possible to
list all the available printers?

Thank you
Todd Huttenstine



Bob Phillips[_6_]

Printer Dialog Box
 
Here's an example Todd,

http://groups.google.com/groups?thre...GP09.p hx.gbl

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Todd Huttenstine" wrote in message
...
Hey

Using code, how would you make the printer dialog box come
up?

Also without showing the dialog box, is it possible to
list all the available printers?

Thank you
Todd Huttenstine




Bob Phillips[_6_]

Printer Dialog Box
 
Frank,

I think Tom was suggesting that the OP should use Google, and simply gave
him the groups search.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Frank Kabel" wrote in message
...
Hi Tom
seems your link is truncated :-)
For the OP: Below a repost (I thinks it's from Tom and/or Jim Rech):
-----
http://support.microsoft.com/support.../q166/0/08.asp
ACC: Enumerating Local and Network Printers

Enumerating Windows' Available Ports
http://www.mvps.org/vbnet/code/enums/enumports.htm
=======================

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




--
Regards
Frank Kabel
Frankfurt, Germany


Tom Ogilvy wrote:
Your first question was already answered by Frank in response to your
last post.

Yes it is possible and there are several methods. This has been
asked many times - see

http://groups.google.com/advanced_group_search?hl=en


"Todd Huttenstine" wrote in
message ...
Hey

Using code, how would you make the printer dialog box come
up?

Also without showing the dialog box, is it possible to
list all the available printers?

Thank you
Todd Huttenstine






All times are GMT +1. The time now is 04:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com