LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA - Active Printer Port Problem

I'm trying to use vba to print a worksheet. Here's the bit of code that is
causing me fits:

ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Local Printer on NE03:", Collate:=True

And, the problem is...The "NE03:" keeps changing when I reboot. Sometimes
the printer is on NE03:. The next time it's on NE04:". So, I borrowed some
code from a site ("TechTrax") that reports a bunch of info about the
printers. Then, I tried to build the ActivePrinter name by combining the
string "Local Printer on " with a string of the port name. However, the
port name gets reported as "USB001" instead of "NE03."

In my list of printers, the printer's name is simply "Local Printer". Any
ideas how to do this?

TIA for any help and suggestions.



 
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
Printer Using USB Port Slows Page Setup Stu B Excel Discussion (Misc queries) 3 April 22nd 10 12:45 PM
printer port assignment in macro DaveAlbany Excel Programming 3 August 11th 06 04:39 PM
Capturing Data from a Com Port or Printer Port Newby :) Excel Programming 3 August 19th 05 01:54 PM
active printer Gixxer_J_97[_2_] Excel Programming 2 June 29th 05 02:24 PM
Active printer Marijan Glavac Excel Programming 1 September 29th 04 01:41 PM


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