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

I am trying to write a macro that allows you to print to a PDF from an excel
sheet. The problem I am running into is that when I have the Adobe Writer
"printer" selected it automatically says it's on Ne02. I need other people
to be able to use this worksheet and I know not everyone has their Adobe
writer on Ne02... Is there a way I can make that universal? I though of
having a popup box for you to input that, but some people using it might not
know enough, is there a way for the code to figure it out for itself? Thanks
in advance for any help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Printer Ports

Printer
Port
PDF


Use something like:

for i = 1 to 9
err.clear
On error resume Next
Application.ActivePrinter = "printername on Ne0" & i & ":"
if err.Number = 0 then exit for
On error goto 0
Next
On Error goto 0


--
Regards,
Tom Ogilvy


"WBTKbeezy" wrote:

I am trying to write a macro that allows you to print to a PDF from an excel
sheet. The problem I am running into is that when I have the Adobe Writer
"printer" selected it automatically says it's on Ne02. I need other people
to be able to use this worksheet and I know not everyone has their Adobe
writer on Ne02... Is there a way I can make that universal? I though of
having a popup box for you to input that, but some people using it might not
know enough, is there a way for the code to figure it out for itself? Thanks
in advance for any help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Printer Ports

That is perfect, although it seems to try to print twice for some reason...
Any thoughts?


"Tom Ogilvy" wrote:

Printer
Port
PDF


Use something like:

for i = 1 to 9
err.clear
On error resume Next
Application.ActivePrinter = "printername on Ne0" & i & ":"
if err.Number = 0 then exit for
On error goto 0
Next
On Error goto 0


--
Regards,
Tom Ogilvy


"WBTKbeezy" wrote:

I am trying to write a macro that allows you to print to a PDF from an excel
sheet. The problem I am running into is that when I have the Adobe Writer
"printer" selected it automatically says it's on Ne02. I need other people
to be able to use this worksheet and I know not everyone has their Adobe
writer on Ne02... Is there a way I can make that universal? I though of
having a popup box for you to input that, but some people using it might not
know enough, is there a way for the code to figure it out for itself? Thanks
in advance for any help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Printer Ports

there was nothing in my code that did a print. So I guess that would be in
your implementation.

--
Regards,
Tom Ogilvy


"WBTKbeezy" wrote:

That is perfect, although it seems to try to print twice for some reason...
Any thoughts?


"Tom Ogilvy" wrote:

Printer
Port
PDF


Use something like:

for i = 1 to 9
err.clear
On error resume Next
Application.ActivePrinter = "printername on Ne0" & i & ":"
if err.Number = 0 then exit for
On error goto 0
Next
On Error goto 0


--
Regards,
Tom Ogilvy


"WBTKbeezy" wrote:

I am trying to write a macro that allows you to print to a PDF from an excel
sheet. The problem I am running into is that when I have the Adobe Writer
"printer" selected it automatically says it's on Ne02. I need other people
to be able to use this worksheet and I know not everyone has their Adobe
writer on Ne02... Is there a way I can make that universal? I though of
having a popup box for you to input that, but some people using it might not
know enough, is there a way for the code to figure it out for itself? Thanks
in advance for any help.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Printer Ports

Works on others computers, so I will have to look into it, thanks a lot this
is a perfect start!

"Tom Ogilvy" wrote:

there was nothing in my code that did a print. So I guess that would be in
your implementation.

--
Regards,
Tom Ogilvy


"WBTKbeezy" wrote:

That is perfect, although it seems to try to print twice for some reason...
Any thoughts?


"Tom Ogilvy" wrote:

Printer
Port
PDF


Use something like:

for i = 1 to 9
err.clear
On error resume Next
Application.ActivePrinter = "printername on Ne0" & i & ":"
if err.Number = 0 then exit for
On error goto 0
Next
On Error goto 0


--
Regards,
Tom Ogilvy


"WBTKbeezy" wrote:

I am trying to write a macro that allows you to print to a PDF from an excel
sheet. The problem I am running into is that when I have the Adobe Writer
"printer" selected it automatically says it's on Ne02. I need other people
to be able to use this worksheet and I know not everyone has their Adobe
writer on Ne02... Is there a way I can make that universal? I though of
having a popup box for you to input that, but some people using it might not
know enough, is there a way for the code to figure it out for itself? Thanks
in advance for any help.

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
Dash Ports Twila Excel Worksheet Functions 1 August 21st 07 11:00 PM
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
Dealing with 3 Printer Ports Brad Excel Programming 1 September 22nd 05 02:29 PM
COM PORTs Jo Excel Programming 0 November 18th 04 10:09 PM
Accessing com ports through Excel97? Michael Bowen Excel Programming 3 October 30th 03 11:56 PM


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