Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting a printer
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00545890
Message ID:
00545902
Views:
20
>I need to be able to set a printed as the default printer on the fly from a VFP application. I need to be able to (for want of better phrases) 1) capture a printer port to a completely different network print queue, 2) send the print, and 3) reset the printer back to the original
>
>Here's the problems, as I see them
>
>1. This printer/print queue will probably not exist on the individual workstations, and
>
>2. This needs to be local to the VFP app
>
>
>This is all running on a Novell 4.11+ network
>
>And, of course, I'm on a short timeline with this so ANY help would be appreciated

Dorris,

First, getting the default printer can be done via the SET("PRINTER", 2) function call. I'd use this will APRINTERS() to get the port.

Setting the default printer can be done, if it's available, via the Windows Script Host's WScript.Network object's SetDefaultPrinter() method. See the fourth in the five part series of articles on using the WSH from within VFP that appeared in the VFUG (www.vfug.org) newsletter. The articles are available on-line at the site. This information can be found in last December's issue.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform