Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 117
Default Print path linked to cell

In a worksheet I am calling a printer from a cell on the worksheet itself.
The problem I am having is when I do this, the path name has to be very
specific. For example,1 of my printer option is "Main Printer on Ne03:". So
If I have my worksheet open on any other computer. I must reinstall all the
printers in a certain order, I believe this the "Ne03" portion of the path
and name them all exactly otherwise it debugs on me when I try to print.

I have to select the path from the sheet because I am doing a looping code
that goes back and forth between 2 sheets and printing them in a colation
fashion and I dont want to call the printer setup each time if i am trying to
print multiple versions.

Any other suggestion how to call the printer from my sheet without having to
give the exact path?

thanks,

Jase

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 434
Default Print path linked to cell

hi, Jase !

1) use constants for search/match your printers names according your output needs

2) build (and preserve) a sorted array of available printers (names only)...
this through - CreateObject("WScript.Network").EnumPrinterConnect ions

3) find (from the sorted array) the index for the current printer (ActivePrinter)

4) search the index (in the sorted array) for the "target" printer name (constant/s in item 1)

5) back/forward for matching index differences using SendKeys ONE instruction line PRIOR to...
show the printer selection dialog: - Application.Dialogs(xlDialogPrinterSetup).Show
(this should be "almost" invisible to the GUI and disregarding the applicable port connection)

6) perform your printing instructions

- repeat steps 3 to 5 for any printer change needs (at the end, return to the "original" ActivePrinter)

hth,
hector.

__ OP __
In a worksheet I am calling a printer from a cell on the worksheet itself.
The problem I am having is when I do this, the path name has to be very specific.
For example,1 of my printer option is "Main Printer on Ne03:".
So If I have my worksheet open on any other computer.
I must reinstall all the printers in a certain order
I believe this the "Ne03" portion of the path and name them all exactly otherwise it debugs on me when I try to print.

I have to select the path from the sheet because I am doing a looping code that goes back and forth between 2 sheets
and printing them in a colation fashion and I dont want to call the printer setup each time if i am trying to print multiple versions.

Any other suggestion how to call the printer from my sheet without having to give the exact path?



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
Maximum Length For Linked Workbook Path? MDW Excel Worksheet Functions 2 May 7th 07 07:37 PM
Relative vs. Absolute Path Names for linked cell data Chef Sandra Excel Discussion (Misc queries) 0 April 11th 07 09:18 PM
Making path of linked cell dynamic Negentropy Excel Discussion (Misc queries) 3 September 24th 05 09:02 PM
How can I replace the path of the linked spreadsheet in a cell? Norm Excel Worksheet Functions 2 July 30th 05 06:26 AM
Automation of Path of linked tables S Patel New Users to Excel 1 February 10th 05 05:53 PM


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