Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing the default Windows printer from VFP
Message
From
19/03/2001 18:02:47
Guy Pardoe
Pardoe Development Corporation
Peterborough, New Hampshire, United States
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00485503
Message ID:
00486676
Views:
14
Hi Colin,

I may misunderstand what you want but you can change the default printer with the following:

oWSH = CREATEOBJECT("WSCRIPT.Network")
? SET("PRINTER",2)
oWSH.SetDefaultPrinter(GETPRINTER())
? SET("PRINTER",2)

Guy


>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 Northway
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform