Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Maximum Length For Linked Workbook Path? | Excel Worksheet Functions | |||
Relative vs. Absolute Path Names for linked cell data | Excel Discussion (Misc queries) | |||
Making path of linked cell dynamic | Excel Discussion (Misc queries) | |||
How can I replace the path of the linked spreadsheet in a cell? | Excel Worksheet Functions | |||
Automation of Path of linked tables | New Users to Excel |