ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   PDF995 on NE00 (https://www.excelbanter.com/excel-programming/401297-pdf995-ne00.html)

Oldjay

PDF995 on NE00
 
I have the following code (partial)

Dim CurrentPrinter As Variant

Workbooks.Open Filename:="C:\Quotes\Quote Form.xls"
Application.CutCopyMode = False

CurrentPrinter = Application.ActivePrinter ' Store current printer.

Application.ActivePrinter = "PDF995 on Ne00:" ' Change Printers."

For i = 1 To 9 ' Check for correct Ne number
Err.Clear
On Error Resume Next
Application.ActivePrinter = "printername on Ne0" & i & ":"
If Err.Number = 0 Then Exit For
On Error GoTo 0
Next

ActiveWindow.SelectedSheets.PrintOut ' Print the active document.
Application.ActivePrinter = CurrentPrinter

I am trying to detect what the other NE0 number is on other computers that
use this program, I can't get to work on my computer that uses NE01.

What is wrong?

oldjay

Oldjay

PDF995 on NE00
 
Forgrt it I forgot to delete = Application.ActivePrinter = "PDF995 on Ne00:"
' Change Printers."

"Oldjay" wrote:

I have the following code (partial)

Dim CurrentPrinter As Variant

Workbooks.Open Filename:="C:\Quotes\Quote Form.xls"
Application.CutCopyMode = False

CurrentPrinter = Application.ActivePrinter ' Store current printer.

Application.ActivePrinter = "PDF995 on Ne00:" ' Change Printers."

For i = 1 To 9 ' Check for correct Ne number
Err.Clear
On Error Resume Next
Application.ActivePrinter = "printername on Ne0" & i & ":"
If Err.Number = 0 Then Exit For
On Error GoTo 0
Next

ActiveWindow.SelectedSheets.PrintOut ' Print the active document.
Application.ActivePrinter = CurrentPrinter

I am trying to detect what the other NE0 number is on other computers that
use this program, I can't get to work on my computer that uses NE01.

What is wrong?

oldjay



All times are GMT +1. The time now is 10:20 PM.

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