Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 337
Default 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

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
Print using PDF995 and cell value as filename Rookie_User Excel Programming 0 April 27th 07 12:26 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"