>I have an Eltron Orion label printer attached to pcA. It is shared on a TCP/IP network.
>
>pcB attempts to print on this printer (pcB default printer is a Laser) using the following code:-
>
>SET PRINTER TO NAME GETPRINTER() - operator selects Eltron on pcA
>SET PRINTER ON PROMPT - operator changes orientation to portrait
>
>BUT - unless the Eltron is set up as pcB's default printer I get 'error accessing printer spooler'
>
>If I could just change pcB'c default printer!!!
>
Colin,
There are a couple of ways to do this. First, and easiest, would be to use the Windows Script Host's Network object's SetDefaultPrinter method. Ed Rauh and I wrote about this object in the Dec. 2000 issue of the VFUG newsletter (
www.vfug.org). It's the fourth article in a five part series that will answer most questions you might have.
The other way (and I don't know if this applies to Win2K or not) would be to change the setting of the Device entry of the Windows section of Win.ini, then broadcast the message to re-load the section to all top-level windows. My
INI Files Class takes care of this automatically. You might want to have a look at the file. Just click the click to go to the page to download it.
George
Ubi caritas et amor, deus ibi est